summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWolfy-J <[email protected]>2018-09-30 18:08:30 +0300
committerWolfy-J <[email protected]>2018-09-30 18:08:30 +0300
commitd2ad0520c23a9f4a0ed98eb54a5482ab62144065 (patch)
tree1660bf0c9e0fd00adbeae27ec3e384020f368de6
parent734fab795eb5ee396ee76955c9ddadc4f3b09112 (diff)
http2-push support
-rw-r--r--service/http/response.go8
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)
}
}