WP_HTTP HTTP/1.1 needs to send Connection Close + support Transfer-encoding better
|Reported by:||dd32||Owned by:||dd32|
WP_HTTP accepts a 'httpversion' argument, and supports some functions of it (such as Transfer-encoding).
However, there are 2 things which are rather broken
- It doesn't send a Connection: close header, so the connection is held open and WP_HTTP never returns
- Transfer-Encoding: chunked appears to be rather broken, causing it to returning the end of the document rather than the decoded document.
The attached patch goes some of the way towards making that work better, but is mostly untested, and could do with a unit test or two.