NewReplacer takes third argument for empty value string

This commit is contained in:
Matthew Holt
2015-07-24 10:11:34 -06:00
parent 7adff28aa9
commit 04571ff393
3 changed files with 57 additions and 51 deletions

View File

@ -89,7 +89,7 @@ func (p Proxy) ServeHTTP(w http.ResponseWriter, r *http.Request) (int, error) {
if replacer == nil {
rHost := r.Host
r.Host = requestHost
replacer = middleware.NewReplacer(r, nil)
replacer = middleware.NewReplacer(r, nil, "")
r.Host = rHost
}
for header, values := range host.ExtraHeaders {