From 2aac0585f4eccc0611770b4c05ae2535bb342a0f Mon Sep 17 00:00:00 2001 From: Friparia Date: Wed, 29 Aug 2018 16:32:12 +0800 Subject: [PATCH] fix param parse when param has no value defination: [rfc5988](https://tools.ietf.org/html/rfc5988#section-5) - link-extension --- main.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/main.go b/main.go index d61af11..6b81321 100644 --- a/main.go +++ b/main.go @@ -136,6 +136,9 @@ func ParseMultiple(headers []string) Links { func parseParam(raw string) (key, val string) { parts := strings.SplitN(raw, "=", 2) + if len(parts) == 1 { + return parts[0], "" + } if len(parts) != 2 { return "", "" }