2022-03-17 17:20:19 +08:00
|
|
|
/***************************************************************************
|
|
|
|
* _ _ ____ _
|
|
|
|
* Project ___| | | | _ \| |
|
|
|
|
* / __| | | | |_) | |
|
|
|
|
* | (__| |_| | _ <| |___
|
|
|
|
* \___|\___/|_| \_\_____|
|
|
|
|
*
|
2023-01-02 20:51:48 +08:00
|
|
|
* Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
2022-03-17 17:20:19 +08:00
|
|
|
*
|
|
|
|
* This software is licensed as described in the file COPYING, which
|
|
|
|
* you should have received as part of this distribution. The terms
|
|
|
|
* are also available at https://curl.se/docs/copyright.html.
|
|
|
|
*
|
|
|
|
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
|
|
|
* copies of the Software, and permit persons to whom the Software is
|
|
|
|
* furnished to do so, under the terms of the COPYING file.
|
|
|
|
*
|
|
|
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
|
|
|
* KIND, either express or implied.
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: curl
|
2022-05-17 17:16:50 +08:00
|
|
|
*
|
2022-03-17 17:20:19 +08:00
|
|
|
***************************************************************************/
|
|
|
|
|
|
|
|
#include "curl_setup.h"
|
|
|
|
|
|
|
|
#include "urldata.h"
|
|
|
|
#include "strdup.h"
|
|
|
|
#include "strcase.h"
|
2024-02-06 20:55:07 +08:00
|
|
|
#include "sendf.h"
|
2022-03-17 17:20:19 +08:00
|
|
|
#include "headers.h"
|
|
|
|
|
|
|
|
/* The last 3 #include files should be in this order */
|
|
|
|
#include "curl_printf.h"
|
|
|
|
#include "curl_memory.h"
|
|
|
|
#include "memdebug.h"
|
|
|
|
|
2022-05-30 20:13:48 +08:00
|
|
|
#if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_HEADERS_API)
|
2022-03-17 17:20:19 +08:00
|
|
|
|
|
|
|
/* Generate the curl_header struct for the user. This function MUST assign all
|
|
|
|
struct fields in the output struct. */
|
2023-03-08 07:33:33 +08:00
|
|
|
static void copy_header_external(struct Curl_header_store *hs,
|
2022-03-17 17:20:19 +08:00
|
|
|
size_t index,
|
|
|
|
size_t amount,
|
2024-08-11 05:27:25 +08:00
|
|
|
struct Curl_llist_node *e,
|
2023-03-08 07:33:33 +08:00
|
|
|
struct curl_header *hout)
|
2022-03-17 17:20:19 +08:00
|
|
|
{
|
2023-03-08 07:33:33 +08:00
|
|
|
struct curl_header *h = hout;
|
2022-03-17 17:20:19 +08:00
|
|
|
h->name = hs->name;
|
|
|
|
h->value = hs->value;
|
|
|
|
h->amount = amount;
|
|
|
|
h->index = index;
|
2022-03-30 16:49:05 +08:00
|
|
|
/* this will randomly OR a reserved bit for the sole purpose of making it
|
|
|
|
impossible for applications to do == comparisons, as that would otherwise
|
|
|
|
be very tempting and then lead to the reserved bits not being reserved
|
|
|
|
anymore. */
|
2024-06-03 04:30:52 +08:00
|
|
|
h->origin = (unsigned int)(hs->type | (1<<27));
|
2022-03-17 17:20:19 +08:00
|
|
|
h->anchor = e;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* public API */
|
|
|
|
CURLHcode curl_easy_header(CURL *easy,
|
|
|
|
const char *name,
|
|
|
|
size_t nameindex,
|
|
|
|
unsigned int type,
|
|
|
|
int request,
|
|
|
|
struct curl_header **hout)
|
|
|
|
{
|
2024-08-11 05:27:25 +08:00
|
|
|
struct Curl_llist_node *e;
|
|
|
|
struct Curl_llist_node *e_pick = NULL;
|
2022-03-17 17:20:19 +08:00
|
|
|
struct Curl_easy *data = easy;
|
|
|
|
size_t match = 0;
|
|
|
|
size_t amount = 0;
|
|
|
|
struct Curl_header_store *hs = NULL;
|
|
|
|
struct Curl_header_store *pick = NULL;
|
|
|
|
if(!name || !hout || !data ||
|
2022-08-01 05:21:09 +08:00
|
|
|
(type > (CURLH_HEADER|CURLH_TRAILER|CURLH_CONNECT|CURLH_1XX|
|
|
|
|
CURLH_PSEUDO)) || !type || (request < -1))
|
2022-03-17 17:20:19 +08:00
|
|
|
return CURLHE_BAD_ARGUMENT;
|
|
|
|
if(!Curl_llist_count(&data->state.httphdrs))
|
|
|
|
return CURLHE_NOHEADERS; /* no headers available */
|
|
|
|
if(request > data->state.requests)
|
|
|
|
return CURLHE_NOREQUEST;
|
|
|
|
if(request == -1)
|
|
|
|
request = data->state.requests;
|
|
|
|
|
|
|
|
/* we need a first round to count amount of this header */
|
2024-08-11 05:27:25 +08:00
|
|
|
for(e = Curl_llist_head(&data->state.httphdrs); e; e = Curl_node_next(e)) {
|
|
|
|
hs = Curl_node_elem(e);
|
2022-03-17 17:20:19 +08:00
|
|
|
if(strcasecompare(hs->name, name) &&
|
|
|
|
(hs->type & type) &&
|
|
|
|
(hs->request == request)) {
|
|
|
|
amount++;
|
|
|
|
pick = hs;
|
|
|
|
e_pick = e;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if(!amount)
|
|
|
|
return CURLHE_MISSING;
|
|
|
|
else if(nameindex >= amount)
|
|
|
|
return CURLHE_BADINDEX;
|
|
|
|
|
|
|
|
if(nameindex == amount - 1)
|
2022-03-30 16:49:05 +08:00
|
|
|
/* if the last or only occurrence is what's asked for, then we know it */
|
2022-03-17 17:20:19 +08:00
|
|
|
hs = pick;
|
|
|
|
else {
|
2024-08-11 05:27:25 +08:00
|
|
|
for(e = Curl_llist_head(&data->state.httphdrs); e; e = Curl_node_next(e)) {
|
|
|
|
hs = Curl_node_elem(e);
|
2022-03-17 17:20:19 +08:00
|
|
|
if(strcasecompare(hs->name, name) &&
|
|
|
|
(hs->type & type) &&
|
|
|
|
(hs->request == request) &&
|
|
|
|
(match++ == nameindex)) {
|
|
|
|
e_pick = e;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
2024-07-01 22:47:21 +08:00
|
|
|
if(!e) /* this should not happen */
|
2022-03-17 17:20:19 +08:00
|
|
|
return CURLHE_MISSING;
|
|
|
|
}
|
|
|
|
/* this is the name we want */
|
2023-03-08 07:33:33 +08:00
|
|
|
copy_header_external(hs, nameindex, amount, e_pick,
|
|
|
|
&data->state.headerout[0]);
|
|
|
|
*hout = &data->state.headerout[0];
|
2022-03-17 17:20:19 +08:00
|
|
|
return CURLHE_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* public API */
|
|
|
|
struct curl_header *curl_easy_nextheader(CURL *easy,
|
|
|
|
unsigned int type,
|
|
|
|
int request,
|
|
|
|
struct curl_header *prev)
|
|
|
|
{
|
|
|
|
struct Curl_easy *data = easy;
|
2024-08-11 05:27:25 +08:00
|
|
|
struct Curl_llist_node *pick;
|
|
|
|
struct Curl_llist_node *e;
|
2022-03-17 17:20:19 +08:00
|
|
|
struct Curl_header_store *hs;
|
|
|
|
size_t amount = 0;
|
|
|
|
size_t index = 0;
|
|
|
|
|
|
|
|
if(request > data->state.requests)
|
|
|
|
return NULL;
|
|
|
|
if(request == -1)
|
|
|
|
request = data->state.requests;
|
|
|
|
|
|
|
|
if(prev) {
|
|
|
|
pick = prev->anchor;
|
|
|
|
if(!pick)
|
|
|
|
/* something is wrong */
|
|
|
|
return NULL;
|
2024-08-11 05:27:25 +08:00
|
|
|
pick = Curl_node_next(pick);
|
2022-03-17 17:20:19 +08:00
|
|
|
}
|
|
|
|
else
|
2024-08-11 05:27:25 +08:00
|
|
|
pick = Curl_llist_head(&data->state.httphdrs);
|
2022-03-17 17:20:19 +08:00
|
|
|
|
|
|
|
if(pick) {
|
|
|
|
/* make sure it is the next header of the desired type */
|
|
|
|
do {
|
2024-08-11 05:27:25 +08:00
|
|
|
hs = Curl_node_elem(pick);
|
2022-03-17 17:20:19 +08:00
|
|
|
if((hs->type & type) && (hs->request == request))
|
|
|
|
break;
|
2024-08-11 05:27:25 +08:00
|
|
|
pick = Curl_node_next(pick);
|
2022-03-18 00:55:06 +08:00
|
|
|
} while(pick);
|
2022-03-17 17:20:19 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
if(!pick)
|
|
|
|
/* no more headers available */
|
|
|
|
return NULL;
|
|
|
|
|
2024-08-11 05:27:25 +08:00
|
|
|
hs = Curl_node_elem(pick);
|
2022-03-17 17:20:19 +08:00
|
|
|
|
|
|
|
/* count number of occurrences of this name within the mask and figure out
|
|
|
|
the index for the currently selected entry */
|
2024-08-11 05:27:25 +08:00
|
|
|
for(e = Curl_llist_head(&data->state.httphdrs); e; e = Curl_node_next(e)) {
|
|
|
|
struct Curl_header_store *check = Curl_node_elem(e);
|
2022-03-17 17:20:19 +08:00
|
|
|
if(strcasecompare(hs->name, check->name) &&
|
|
|
|
(check->request == request) &&
|
|
|
|
(check->type & type))
|
|
|
|
amount++;
|
|
|
|
if(e == pick)
|
|
|
|
index = amount - 1;
|
|
|
|
}
|
|
|
|
|
2023-03-08 07:33:33 +08:00
|
|
|
copy_header_external(hs, index, amount, pick,
|
|
|
|
&data->state.headerout[1]);
|
|
|
|
return &data->state.headerout[1];
|
2022-03-17 17:20:19 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
static CURLcode namevalue(char *header, size_t hlen, unsigned int type,
|
2024-01-08 17:34:06 +08:00
|
|
|
char **name, char **value)
|
2022-03-17 17:20:19 +08:00
|
|
|
{
|
|
|
|
char *end = header + hlen - 1; /* point to the last byte */
|
|
|
|
DEBUGASSERT(hlen);
|
|
|
|
*name = header;
|
|
|
|
|
|
|
|
if(type == CURLH_PSEUDO) {
|
|
|
|
if(*header != ':')
|
|
|
|
return CURLE_BAD_FUNCTION_ARGUMENT;
|
|
|
|
header++;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Find the end of the header name */
|
|
|
|
while(*header && (*header != ':'))
|
|
|
|
++header;
|
|
|
|
|
|
|
|
if(*header)
|
|
|
|
/* Skip over colon, null it */
|
|
|
|
*header++ = 0;
|
|
|
|
else
|
|
|
|
return CURLE_BAD_FUNCTION_ARGUMENT;
|
|
|
|
|
|
|
|
/* skip all leading space letters */
|
2022-09-06 05:21:15 +08:00
|
|
|
while(*header && ISBLANK(*header))
|
2022-03-17 17:20:19 +08:00
|
|
|
header++;
|
|
|
|
|
|
|
|
*value = header;
|
|
|
|
|
|
|
|
/* skip all trailing space letters */
|
|
|
|
while((end > header) && ISSPACE(*end))
|
|
|
|
*end-- = 0; /* nul terminate */
|
|
|
|
return CURLE_OK;
|
|
|
|
}
|
|
|
|
|
2022-05-25 16:32:22 +08:00
|
|
|
static CURLcode unfold_value(struct Curl_easy *data, const char *value,
|
2022-05-25 05:33:35 +08:00
|
|
|
size_t vlen) /* length of the incoming header */
|
|
|
|
{
|
|
|
|
struct Curl_header_store *hs;
|
|
|
|
struct Curl_header_store *newhs;
|
|
|
|
size_t olen; /* length of the old value */
|
2022-05-25 16:32:22 +08:00
|
|
|
size_t oalloc; /* length of the old name + value + separator */
|
2022-05-25 05:33:35 +08:00
|
|
|
size_t offset;
|
|
|
|
DEBUGASSERT(data->state.prevhead);
|
|
|
|
hs = data->state.prevhead;
|
|
|
|
olen = strlen(hs->value);
|
|
|
|
offset = hs->value - hs->buffer;
|
2022-06-01 20:04:17 +08:00
|
|
|
oalloc = olen + offset + 1;
|
2022-05-25 05:33:35 +08:00
|
|
|
|
|
|
|
/* skip all trailing space letters */
|
|
|
|
while(vlen && ISSPACE(value[vlen - 1]))
|
|
|
|
vlen--;
|
|
|
|
|
|
|
|
/* save only one leading space */
|
2022-09-06 05:21:15 +08:00
|
|
|
while((vlen > 1) && ISBLANK(value[0]) && ISBLANK(value[1])) {
|
2022-05-25 05:33:35 +08:00
|
|
|
vlen--;
|
|
|
|
value++;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* since this header block might move in the realloc below, it needs to
|
|
|
|
first be unlinked from the list and then re-added again after the
|
|
|
|
realloc */
|
2024-08-11 05:27:25 +08:00
|
|
|
Curl_node_remove(&hs->node);
|
2022-05-25 05:33:35 +08:00
|
|
|
|
2022-05-25 16:32:22 +08:00
|
|
|
/* new size = struct + new value length + old name+value length */
|
|
|
|
newhs = Curl_saferealloc(hs, sizeof(*hs) + vlen + oalloc + 1);
|
2022-05-25 05:33:35 +08:00
|
|
|
if(!newhs)
|
|
|
|
return CURLE_OUT_OF_MEMORY;
|
2024-05-06 16:35:53 +08:00
|
|
|
/* ->name and ->value point into ->buffer (to keep the header allocation
|
2022-05-25 05:33:35 +08:00
|
|
|
in a single memory block), which now potentially have moved. Adjust
|
|
|
|
them. */
|
|
|
|
newhs->name = newhs->buffer;
|
|
|
|
newhs->value = &newhs->buffer[offset];
|
|
|
|
|
|
|
|
/* put the data at the end of the previous data, not the newline */
|
|
|
|
memcpy(&newhs->value[olen], value, vlen);
|
2022-09-17 23:32:21 +08:00
|
|
|
newhs->value[olen + vlen] = 0; /* null-terminate at newline */
|
2022-05-25 05:33:35 +08:00
|
|
|
|
|
|
|
/* insert this node into the list of headers */
|
2024-04-10 17:51:08 +08:00
|
|
|
Curl_llist_append(&data->state.httphdrs, newhs, &newhs->node);
|
2022-05-25 05:33:35 +08:00
|
|
|
data->state.prevhead = newhs;
|
|
|
|
return CURLE_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2022-03-17 17:20:19 +08:00
|
|
|
/*
|
|
|
|
* Curl_headers_push() gets passed a full HTTP header to store. It gets called
|
|
|
|
* immediately before the header callback. The header is CRLF terminated.
|
|
|
|
*/
|
|
|
|
CURLcode Curl_headers_push(struct Curl_easy *data, const char *header,
|
|
|
|
unsigned char type)
|
|
|
|
{
|
|
|
|
char *value = NULL;
|
|
|
|
char *name = NULL;
|
|
|
|
char *end;
|
|
|
|
size_t hlen; /* length of the incoming header */
|
|
|
|
struct Curl_header_store *hs;
|
|
|
|
CURLcode result = CURLE_OUT_OF_MEMORY;
|
|
|
|
|
|
|
|
if((header[0] == '\r') || (header[0] == '\n'))
|
|
|
|
/* ignore the body separator */
|
|
|
|
return CURLE_OK;
|
|
|
|
|
|
|
|
end = strchr(header, '\r');
|
|
|
|
if(!end) {
|
|
|
|
end = strchr(header, '\n');
|
|
|
|
if(!end)
|
2024-01-17 06:50:02 +08:00
|
|
|
/* neither CR nor LF as terminator is not a valid header */
|
|
|
|
return CURLE_WEIRD_SERVER_REPLY;
|
2022-03-17 17:20:19 +08:00
|
|
|
}
|
2024-01-10 16:22:59 +08:00
|
|
|
hlen = end - header;
|
2022-03-17 17:20:19 +08:00
|
|
|
|
2022-05-31 20:03:09 +08:00
|
|
|
if((header[0] == ' ') || (header[0] == '\t')) {
|
|
|
|
if(data->state.prevhead)
|
|
|
|
/* line folding, append value to the previous header's value */
|
|
|
|
return unfold_value(data, header, hlen);
|
2023-08-07 18:45:45 +08:00
|
|
|
else {
|
2024-07-01 22:47:21 +08:00
|
|
|
/* cannot unfold without a previous header. Instead of erroring, just
|
2023-08-07 18:45:45 +08:00
|
|
|
pass the leading blanks. */
|
|
|
|
while(hlen && ISBLANK(*header)) {
|
|
|
|
header++;
|
|
|
|
hlen--;
|
|
|
|
}
|
|
|
|
if(!hlen)
|
|
|
|
return CURLE_WEIRD_SERVER_REPLY;
|
|
|
|
}
|
2022-05-31 20:03:09 +08:00
|
|
|
}
|
2022-05-25 05:33:35 +08:00
|
|
|
|
2022-03-17 17:20:19 +08:00
|
|
|
hs = calloc(1, sizeof(*hs) + hlen);
|
|
|
|
if(!hs)
|
|
|
|
return CURLE_OUT_OF_MEMORY;
|
|
|
|
memcpy(hs->buffer, header, hlen);
|
|
|
|
hs->buffer[hlen] = 0; /* nul terminate */
|
|
|
|
|
|
|
|
result = namevalue(hs->buffer, hlen, type, &name, &value);
|
2024-01-17 06:50:02 +08:00
|
|
|
if(!result) {
|
|
|
|
hs->name = name;
|
|
|
|
hs->value = value;
|
|
|
|
hs->type = type;
|
|
|
|
hs->request = data->state.requests;
|
|
|
|
|
|
|
|
/* insert this node into the list of headers */
|
2024-04-10 17:51:08 +08:00
|
|
|
Curl_llist_append(&data->state.httphdrs, hs, &hs->node);
|
2024-01-17 06:50:02 +08:00
|
|
|
data->state.prevhead = hs;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
free(hs);
|
2022-03-17 17:20:19 +08:00
|
|
|
return result;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
2024-02-06 20:55:07 +08:00
|
|
|
* Curl_headers_reset(). Reset the headers subsystem.
|
2022-03-17 17:20:19 +08:00
|
|
|
*/
|
2024-02-06 20:55:07 +08:00
|
|
|
static void headers_reset(struct Curl_easy *data)
|
2022-03-17 17:20:19 +08:00
|
|
|
{
|
|
|
|
Curl_llist_init(&data->state.httphdrs, NULL);
|
2023-05-11 15:56:51 +08:00
|
|
|
data->state.prevhead = NULL;
|
2022-03-17 17:20:19 +08:00
|
|
|
}
|
|
|
|
|
2024-02-06 20:55:07 +08:00
|
|
|
struct hds_cw_collect_ctx {
|
|
|
|
struct Curl_cwriter super;
|
|
|
|
};
|
|
|
|
|
|
|
|
static CURLcode hds_cw_collect_write(struct Curl_easy *data,
|
|
|
|
struct Curl_cwriter *writer, int type,
|
|
|
|
const char *buf, size_t blen)
|
|
|
|
{
|
|
|
|
if((type & CLIENTWRITE_HEADER) && !(type & CLIENTWRITE_STATUS)) {
|
|
|
|
unsigned char htype = (unsigned char)
|
|
|
|
(type & CLIENTWRITE_CONNECT ? CURLH_CONNECT :
|
|
|
|
(type & CLIENTWRITE_1XX ? CURLH_1XX :
|
|
|
|
(type & CLIENTWRITE_TRAILER ? CURLH_TRAILER :
|
|
|
|
CURLH_HEADER)));
|
|
|
|
CURLcode result = Curl_headers_push(data, buf, htype);
|
2024-03-28 21:12:54 +08:00
|
|
|
CURL_TRC_WRITE(data, "header_collect pushed(type=%x, len=%zu) -> %d",
|
|
|
|
htype, blen, result);
|
2024-02-06 20:55:07 +08:00
|
|
|
if(result)
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
return Curl_cwriter_write(data, writer->next, type, buf, blen);
|
|
|
|
}
|
|
|
|
|
|
|
|
static const struct Curl_cwtype hds_cw_collect = {
|
|
|
|
"hds-collect",
|
|
|
|
NULL,
|
|
|
|
Curl_cwriter_def_init,
|
|
|
|
hds_cw_collect_write,
|
|
|
|
Curl_cwriter_def_close,
|
|
|
|
sizeof(struct hds_cw_collect_ctx)
|
|
|
|
};
|
|
|
|
|
|
|
|
CURLcode Curl_headers_init(struct Curl_easy *data)
|
|
|
|
{
|
|
|
|
struct Curl_cwriter *writer;
|
|
|
|
CURLcode result;
|
|
|
|
|
|
|
|
if(data->conn && (data->conn->handler->protocol & PROTO_FAMILY_HTTP)) {
|
|
|
|
/* avoid installing it twice */
|
|
|
|
if(Curl_cwriter_get_by_name(data, hds_cw_collect.name))
|
|
|
|
return CURLE_OK;
|
|
|
|
|
|
|
|
result = Curl_cwriter_create(&writer, data, &hds_cw_collect,
|
|
|
|
CURL_CW_PROTOCOL);
|
|
|
|
if(result)
|
|
|
|
return result;
|
|
|
|
|
|
|
|
result = Curl_cwriter_add(data, writer);
|
|
|
|
if(result) {
|
|
|
|
Curl_cwriter_free(data, writer);
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return CURLE_OK;
|
|
|
|
}
|
|
|
|
|
2022-03-17 17:20:19 +08:00
|
|
|
/*
|
|
|
|
* Curl_headers_cleanup(). Free all stored headers and associated memory.
|
|
|
|
*/
|
|
|
|
CURLcode Curl_headers_cleanup(struct Curl_easy *data)
|
|
|
|
{
|
2024-08-11 05:27:25 +08:00
|
|
|
struct Curl_llist_node *e;
|
|
|
|
struct Curl_llist_node *n;
|
2022-03-17 17:20:19 +08:00
|
|
|
|
2024-08-11 05:27:25 +08:00
|
|
|
for(e = Curl_llist_head(&data->state.httphdrs); e; e = n) {
|
|
|
|
struct Curl_header_store *hs = Curl_node_elem(e);
|
|
|
|
n = Curl_node_next(e);
|
2022-03-17 17:20:19 +08:00
|
|
|
free(hs);
|
|
|
|
}
|
2024-02-06 20:55:07 +08:00
|
|
|
headers_reset(data);
|
2022-03-17 17:20:19 +08:00
|
|
|
return CURLE_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
#else /* HTTP-disabled builds below */
|
|
|
|
|
|
|
|
CURLHcode curl_easy_header(CURL *easy,
|
|
|
|
const char *name,
|
|
|
|
size_t index,
|
2022-03-20 05:40:20 +08:00
|
|
|
unsigned int origin,
|
|
|
|
int request,
|
2022-03-17 17:20:19 +08:00
|
|
|
struct curl_header **hout)
|
|
|
|
{
|
|
|
|
(void)easy;
|
|
|
|
(void)name;
|
|
|
|
(void)index;
|
2022-03-20 05:40:20 +08:00
|
|
|
(void)origin;
|
|
|
|
(void)request;
|
2022-03-17 17:20:19 +08:00
|
|
|
(void)hout;
|
|
|
|
return CURLHE_NOT_BUILT_IN;
|
|
|
|
}
|
|
|
|
|
|
|
|
struct curl_header *curl_easy_nextheader(CURL *easy,
|
|
|
|
unsigned int type,
|
2022-03-20 05:40:20 +08:00
|
|
|
int request,
|
2022-03-17 17:20:19 +08:00
|
|
|
struct curl_header *prev)
|
|
|
|
{
|
|
|
|
(void)easy;
|
|
|
|
(void)type;
|
2022-03-20 05:40:20 +08:00
|
|
|
(void)request;
|
2022-03-17 17:20:19 +08:00
|
|
|
(void)prev;
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
#endif
|