envoyproxy/envoy

Early Hints support

Open

#25,881 opened on Mar 2, 2023

View on GitHub
 (6 comments) (2 reactions) (0 assignees)C++ (5,373 forks)batch import
area/httphelp wantedinvestigate

Repository metrics

Stars
 (27,997 stars)
PR merge metrics
 (Avg merge 8d) (378 merged PRs in 30d)

Description

Title: Is Early Hints supported?

Description:

With Early Hints you can send multiple 103 responses to the client:

HTTP/1.1 103 Early Hints
Link: </main.css>; rel=preload; as=style

HTTP/1.1 103 Early Hints
Link: </style.css>; rel=preload; as=style
Link: </script.js>; rel=preload; as=script

HTTP/1.1 200 OK
Date: Fri, 26 May 2017 10:02:11 GMT
Content-Length: 1234
Content-Type: text/html; charset=utf-8
Link: </main.css>; rel=preload; as=style
Link: </newstyle.css>; rel=preload; as=style
Link: </script.js>; rel=preload; as=script

Looks like that 103 headers is ignored, and response proxied only after 200 status. Maybe this filter responsible for this behaviour - https://github.com/envoyproxy/envoy/blob/main/contrib/golang/filters/http/source/go/pkg/api/type.go#L38 (don't sure this code are relates to problem)

Relevant Links

Early Hints specification - https://httpwg.org/specs/rfc8297.html#early-hints

Contributor guide