mirror of
https://github.com/curl/curl.git
synced 2026-08-25 14:03:36 +03:00
http: move headers collecting to writer
- add a client writer that does "push" response headers written to the client if the headers api is enabled - remove special handling in sendf.c - needs to be installed very early on connection setup to catch CONNECT response headers Closes #12880
This commit is contained in:
parent
5b41fac587
commit
2abfa3833b
6 changed files with 90 additions and 19 deletions
|
|
@ -36,6 +36,12 @@ struct Curl_header_store {
|
|||
char buffer[1]; /* this is the raw header blob */
|
||||
};
|
||||
|
||||
/*
|
||||
* Initialize header collecting for a transfer.
|
||||
* Will add a client writer that catches CLIENTWRITE_HEADER writes.
|
||||
*/
|
||||
CURLcode Curl_headers_init(struct Curl_easy *data);
|
||||
|
||||
/*
|
||||
* Curl_headers_push() gets passed a full header to store.
|
||||
*/
|
||||
|
|
@ -48,6 +54,7 @@ CURLcode Curl_headers_push(struct Curl_easy *data, const char *header,
|
|||
CURLcode Curl_headers_cleanup(struct Curl_easy *data);
|
||||
|
||||
#else
|
||||
#define Curl_headers_init(x) CURLE_OK
|
||||
#define Curl_headers_push(x,y,z) CURLE_OK
|
||||
#define Curl_headers_cleanup(x) Curl_nop_stmt
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue