(no title)
josh3736 | 1 year ago
Pretty much every HTTP middlebox (proxies, CDNs, etc) treats HTTP headers as a unit, buffering them up until complete (ie receiving `\r\n\r\n` in HTTP/1 and a HEADERS or CONTINUATION frame with the END_HEADERS flag set in HTTP/2). Once complete, the middlebox applies its logic based on the complete header set, and only then does it flush the headers to the client.
So if you slow-roll your headers, they'll just sit in your CDN's buffer until your time-consuming processing has finished, and only then will the browser see anything (along with the first chunk of HTML), making the whole exercise futile.
This is why the 103 is useful. A reasonable middlebox will pass the 103 along to the client as soon as the header block is complete.
xg15|1 year ago