diff options
Diffstat (limited to 'service/http/response.go')
-rw-r--r-- | service/http/response.go | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/service/http/response.go b/service/http/response.go index d43f514d..eb8ce32b 100644 --- a/service/http/response.go +++ b/service/http/response.go @@ -31,9 +31,17 @@ func NewResponse(p *roadrunner.Payload) (*Response, error) { // Write writes response headers, status and body into ResponseWriter. func (r *Response) Write(w http.ResponseWriter) error { - for k, v := range r.Headers { - for _, h := range v { - w.Header().Add(k, h) + for n, h := range r.Headers { + for _, v := range h { + if n == "http2-push" { + if pusher, ok := w.(http.Pusher); ok { + pusher.Push(v, nil) + } + + continue + } + + w.Header().Add(n, v) } } |