diff options
author | Wolfy-J <[email protected]> | 2018-09-30 18:08:30 +0300 |
---|---|---|
committer | Wolfy-J <[email protected]> | 2018-09-30 18:08:30 +0300 |
commit | d2ad0520c23a9f4a0ed98eb54a5482ab62144065 (patch) | |
tree | 1660bf0c9e0fd00adbeae27ec3e384020f368de6 /service | |
parent | 734fab795eb5ee396ee76955c9ddadc4f3b09112 (diff) |
http2-push support
Diffstat (limited to 'service')
-rw-r--r-- | service/http/response.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/service/http/response.go b/service/http/response.go index 4902ee70..eb8ce32b 100644 --- a/service/http/response.go +++ b/service/http/response.go @@ -33,6 +33,14 @@ func NewResponse(p *roadrunner.Payload) (*Response, error) { func (r *Response) Write(w http.ResponseWriter) error { 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) } } |