From ae8ce676587c971198a20b2ee54e7be76adcb922 Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Sun, 13 Dec 2015 03:20:54 +0100 Subject: kiss --- client.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'client.go') diff --git a/client.go b/client.go index a97279b..40590d6 100644 --- a/client.go +++ b/client.go @@ -8,7 +8,6 @@ import ( "io/ioutil" "log" "net/http" - "net/textproto" "regexp" "time" ) @@ -113,9 +112,8 @@ func location(r *http.Response) string { func links(r *http.Response) Link { link := make(Link) - key := textproto.CanonicalMIMEHeaderKey("Link") reg := regexp.MustCompile(`^<(.*)>;rel="(.*)"`) - for _, l := range r.Header[key] { + for _, l := range r.Header["Link"] { re := reg.FindStringSubmatch(l) if len(re) == 3 { link[re[2]] = re[1] -- cgit v1.2.3