AcceptParams contains at least one character as argument. Fixes #17

This commit is contained in:
Gerdriaan Mulder 2019-11-29 20:50:07 +01:00
parent 0e7b2bc83c
commit 8b87cd0f8a

View File

@ -30,7 +30,7 @@ var htmlTemplates = make(map[string]*html.Template, 0)
// Used by resolveResponseContentType
var acceptHeaderMediaRangeRegex = regexp.MustCompile(`^\s*([^()<>@,;:\\"/\[\]?.=]+)/([^()<>@,;:\\"/\[\]?.=]+)\s*$`)
var acceptHeaderAcceptParamsRegex = regexp.MustCompile(`^\s*(\w+)=([A-Za-z0-9.-])\s*$`)
var acceptHeaderAcceptParamsRegex = regexp.MustCompile(`^\s*(\w+)=([A-Za-z0-9.-]+)\s*$`)
var acceptHeaderWeight = regexp.MustCompile(`^\s*q=0(?:\.([0-9]{0,3}))|1(?:\.0{0,3})\s*$`)
// HTML templates