Update HTTP header regexp selector.

This commit is contained in:
buffermet 2020-10-03 02:00:41 +10:00
parent 6bf46c7ff6
commit dd08976e8b

View file

@ -29,7 +29,7 @@ type JSRequest struct {
bodyRead bool
}
var header_regexp = regexp.MustCompile(`(.*?): (.*)`)
var header_regexp = regexp.MustCompile(`^\s*(.*?)\s*:\s*(.*)\s*$`)
func NewJSRequest(req *http.Request) *JSRequest {
headers := ""