nghttp: Remove garbage for deprecated per-stream compression which cause leak

This commit is contained in:
Tatsuhiro Tsujikawa 2014-06-19 23:35:58 +09:00
parent 2bfa772472
commit 0cd26d6f3b
1 changed files with 0 additions and 40 deletions

View File

@ -428,13 +428,11 @@ struct HttpClient {
event *settings_timerev;
addrinfo *addrs;
addrinfo *next_addr;
nghttp2_gzip *inflater;
// The number of completed requests, including failed ones.
size_t complete;
// The length of settings_payload
size_t settings_payloadlen;
client_state state;
int32_t last_inflate_error_stream_id;
// The HTTP status code of the response message of HTTP Upgrade.
unsigned int upgrade_response_status_code;
// true if the response message of HTTP Upgrade request is fully
@ -454,11 +452,9 @@ struct HttpClient {
settings_timerev(nullptr),
addrs(nullptr),
next_addr(nullptr),
inflater(nullptr),
complete(0),
settings_payloadlen(0),
state(STATE_IDLE),
last_inflate_error_stream_id(0),
upgrade_response_status_code(0),
upgrade_response_complete(false)
{}
@ -919,38 +915,6 @@ struct HttpClient {
stat.on_handshake_time = get_time();
}
bool check_inflater(int32_t stream_id)
{
if(inflater == nullptr || last_inflate_error_stream_id == stream_id) {
return false;
}
last_inflate_error_stream_id = 0;
return true;
}
bool reset_inflater()
{
int rv;
nghttp2_gzip *gzip;
if(inflater) {
nghttp2_gzip_inflate_del(inflater);
inflater = nullptr;
}
rv = nghttp2_gzip_inflate_new(&gzip);
if(rv != 0) {
return false;
}
inflater = gzip;
return true;
}
void on_request(Request *req)
{
req->record_request_time();
@ -1685,10 +1649,6 @@ int communicate(const std::string& scheme, const std::string& host,
{
HttpClient client{callbacks, evbase, ssl_ctx};
if(!client.reset_inflater()) {
goto fin;
}
nghttp2_priority_spec pri_spec;
if(config.weight != NGHTTP2_DEFAULT_WEIGHT) {