TUN-2881: Parameterize response meta information header name in the generating function

This commit is contained in:
Areg Harutyunyan
2020-04-10 20:26:09 +01:00
parent 322f909edb
commit 06f29306cd
4 changed files with 9 additions and 9 deletions

View File

@@ -67,7 +67,7 @@ func (hc *HTTPService) Proxy(stream *h2mux.MuxedStream, req *http.Request) (*htt
defer resp.Body.Close()
responseHeaders := h1ResponseToH2Response(resp)
responseHeaders = append(responseHeaders, h2mux.CreateResponseMetaHeader(responseSourceOrigin))
responseHeaders = append(responseHeaders, h2mux.CreateResponseMetaHeader(h2mux.ResponseMetaHeaderField, responseSourceOrigin))
err = stream.WriteHeaders(responseHeaders)
if err != nil {
return nil, errors.Wrap(err, "error writing response header to HTTP origin")