From 05616379eed2f768ef20371cb4265a445b825fe9 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 8 Mar 2023 00:33:33 +0100 Subject: 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 --- lib/urldata.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/urldata.h') 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 */ -- cgit v1.2.1