summaryrefslogtreecommitdiff
path: root/lib/urldata.h
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2023-03-08 00:33:33 +0100
committerDaniel Stenberg <daniel@haxx.se>2023-03-09 00:13:41 +0100
commit05616379eed2f768ef20371cb4265a445b825fe9 (patch)
tree9ea96697850476c5c1bf14385d209365a799efde /lib/urldata.h
parentb1d735956f42cf1fb2351116a30b0aa35c78829e (diff)
downloadcurl-05616379eed2f768ef20371cb4265a445b825fe9.tar.gz
headers: make curl_easy_header and nextheader return different buffers
By letting curl_easy_header() and curl_easy_nextheader() store the header data in their own struct storage when they return a pointer to it, it makes it possible for applications to use them both in a loop. Like the curl tool does. Reported-by: Boris Okunskiy Fixes #10704 Closes #10707
Diffstat (limited to 'lib/urldata.h')
-rw-r--r--lib/urldata.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/urldata.h b/lib/urldata.h
index 75dca5e74..bf5daaf50 100644
--- a/lib/urldata.h
+++ b/lib/urldata.h
@@ -1378,7 +1378,7 @@ struct UrlState {
struct dynbuf trailers_buf; /* a buffer containing the compiled trailing
headers */
struct Curl_llist httphdrs; /* received headers */
- struct curl_header headerout; /* for external purposes */
+ struct curl_header headerout[2]; /* for external purposes */
struct Curl_header_store *prevhead; /* the latest added header */
trailers_state trailers_state; /* whether we are sending trailers
and what stage are we at */