A server might respond with a content-encoding header and a response
that was encoded accordingly in HTTP-draft-09/2.0 mode, even if the
client did not send an accept-encoding header earlier. The server might
not send a content-encoding header if the identity encoding was used to
encode the response.
See:
http://tools.ietf.org/html/draft-ietf-httpbis-http2-09#section-9.3
}
else if(checkprefix("Content-Encoding:", k->p) &&
- data->set.str[STRING_ENCODING]) {
+ (data->set.str[STRING_ENCODING] ||
+ conn->httpversion == 20)) {
/*
* Process Content-Encoding. Look for the values: identity,
* gzip, deflate, compress, x-gzip and x-compress. x-gzip and
free(base64);
k->upgr101 = UPGR101_REQUESTED;
- k->auto_decoding = GZIP;
return result;
}
httpc->data = NULL;
httpc->datalen = 0;
- conn->data->req.auto_decoding = GZIP;
+ conn->httpversion = 20;
/* Put place holder for status line */
Curl_add_buffer(httpc->header_recvbuf, "HTTP/2.0 200\r\n", 14);