$req->setHeader( 'Accept-Encoding', 'gzip' ); would be useful, but there isn't support for it.
Version: 1.23.0
Severity: normal
$req->setHeader( 'Accept-Encoding', 'gzip' ); would be useful, but there isn't support for it.
Version: 1.23.0
Severity: normal
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Declined | Jdforrester-WMF | T58605 VisualEditor: Send Accept-encoding: gzip to Parsoid service | |||
Open | None | T63507 Let MWHttpRequest set Accept-Encoding: gzip |
Should this even be necessary?
I think that the cURL backend ignores this and sets it's own accept-encoding, and then returns the decoded response. The PHP backend does send this accept-encoding header *if asked by the caller* (e.g. with the code you mentioned), but does not decode the response.
I think we should modify the PHP backend to behave the same as the cURL one, and don't bother relying on the caller to set Accept-Encoding.