summaryrefslogtreecommitdiff
path: root/cmd/gen-posix/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/gen-posix/main.go')
-rw-r--r--cmd/gen-posix/main.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/cmd/gen-posix/main.go b/cmd/gen-posix/main.go
index 7525719..6da598b 100644
--- a/cmd/gen-posix/main.go
+++ b/cmd/gen-posix/main.go
@@ -18,7 +18,7 @@ func (doc Document) URL() string {
}
key := doc.Vendor.Name + "\000" + doc.ID
if _, have := urls[key]; !have {
- urls[key] = doc.Vendor.GetURL(doc.ID)
+ urls[key] = checkURL(doc.Vendor.GetURL(doc.ID))
}
return urls[key]
}
@@ -185,6 +185,8 @@ var tmpl = `{{define "document"}}{{if .}}
func mainWithError() error {
httpcache.UserAgent = "https://git.lukeshu.com/www/tree/cmd/gen-posix"
+ httpcache.ModifyResponse = modifyResponse
+ httpcache.CheckRedirect = checkRedirect
tmpl := template.Must(template.New("page").Parse(tmpl))