diff --git a/modules/http_proxy/http_proxy_js_request.go b/modules/http_proxy/http_proxy_js_request.go index c0ba9f26..563c9b33 100644 --- a/modules/http_proxy/http_proxy_js_request.go +++ b/modules/http_proxy/http_proxy_js_request.go @@ -117,6 +117,7 @@ func (j *JSRequest) CheckIfModifiedAndUpdateHash() bool { } func (j *JSRequest) GetHeader(name, deflt string) string { + name = strings.ToLower(name) headers := strings.Split(j.Headers, "\r\n") for i := 0; i < len(headers); i++ { if headers[i] != "" { @@ -124,7 +125,7 @@ func (j *JSRequest) GetHeader(name, deflt string) string { if len(header_parts) != 0 && len(header_parts[0]) == 3 { header_name := string(header_parts[0][1]) header_value := string(header_parts[0][2]) - if strings.ToLower(name) == strings.ToLower(header_name) { + if name == strings.ToLower(header_name) { return header_value } }