Merge pull request #5 from friparia/master
fix param parse when param has no value
This commit is contained in:
commit
3eda75a91f
3
main.go
3
main.go
|
@ -136,6 +136,9 @@ func ParseMultiple(headers []string) Links {
|
||||||
func parseParam(raw string) (key, val string) {
|
func parseParam(raw string) (key, val string) {
|
||||||
|
|
||||||
parts := strings.SplitN(raw, "=", 2)
|
parts := strings.SplitN(raw, "=", 2)
|
||||||
|
if len(parts) == 1 {
|
||||||
|
return parts[0], ""
|
||||||
|
}
|
||||||
if len(parts) != 2 {
|
if len(parts) != 2 {
|
||||||
return "", ""
|
return "", ""
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user