ensure that certain request headers may not be overwritten / added to

This commit is contained in:
Reed Allman
2017-09-06 07:20:21 -07:00
parent c10462cdc5
commit 639adf70eb
3 changed files with 29 additions and 4 deletions

View File

@@ -42,7 +42,7 @@ func (h *HTTPProtocol) Dispatch(w io.Writer, req *http.Request) error {
}
for k, v := range res.Header {
rw.Header()[k] = v
rw.Header().Add(k, v) // on top of any specified on the route
}
rw.WriteHeader(res.StatusCode)
// TODO should we TCP_CORK ?