]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
http: the 'closed' struct field is used by both ngh2 and ngh3
authorDaniel Stenberg <daniel@haxx.se>
Sat, 24 Aug 2019 08:45:18 +0000 (10:45 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Sat, 24 Aug 2019 15:21:41 +0000 (17:21 +0200)
and remove 'header_recvbuf', not used for anything

Reported-by: Jeremy Lainé
Closes #4257

lib/http.h
lib/vquic/ngtcp2.c

index 6232bbc3a5f1eed9b28d69de7f4ae3cf6ea52c8e..5bacb17545423f989a6dfda7e5e992f71ed9ff1b 100644 (file)
@@ -176,7 +176,6 @@ 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 */
@@ -184,6 +183,7 @@ struct HTTP {
   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 */
index 008a75cfdc46357723151999a3922210ce11e4ab..1cdbb7d39df423722cd127b33a0523aacfd0b8df 100644 (file)
@@ -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: