Skip to content

Commit

Permalink
http: the 'closed' struct field is used by both ngh2 and ngh3
Browse files Browse the repository at this point in the history
and remove 'header_recvbuf', not used for anything

Reported-by: Jeremy Lainé

Closes #4257
  • Loading branch information
bagder committed Aug 24, 2019
1 parent 0a5d28f commit 65fda73
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
2 changes: 1 addition & 1 deletion lib/http.h
Expand Up @@ -176,14 +176,14 @@ struct HTTP {
int status_code; /* HTTP status code */
const uint8_t *pausedata; /* pointer to data received in on_data_chunk */
size_t pauselen; /* the number of bytes left in data */
bool closed; /* TRUE on HTTP2 stream close */
bool close_handled; /* TRUE if stream closure is handled by libcurl */

char **push_headers; /* allocated array */
size_t push_headers_used; /* number of entries filled in */
size_t push_headers_alloc; /* number of entries allocated */
#endif
#if defined(USE_NGHTTP2) || defined(USE_NGHTTP3)
bool closed; /* TRUE on HTTP2 stream close */
char *mem; /* points to a buffer in memory to store received data */
size_t len; /* size of the buffer 'mem' points to */
size_t memlen; /* size of data copied to mem */
Expand Down
6 changes: 0 additions & 6 deletions lib/vquic/ngtcp2.c
Expand Up @@ -1784,12 +1784,6 @@ static CURLcode http_request(struct connectdata *conn, const void *mem,
}
}

stream->header_recvbuf = Curl_add_buffer_init();
if(!stream->header_recvbuf) {
result = CURLE_OUT_OF_MEMORY;
goto fail;
}

switch(data->set.httpreq) {
case HTTPREQ_POST:
case HTTPREQ_POST_FORM:
Expand Down

0 comments on commit 65fda73

Please sign in to comment.