mirror of
https://github.com/moparisthebest/curl
synced 2024-12-21 23:58:49 -05:00
struct HttpHeader changed to struct curl_slist
This commit is contained in:
parent
28b0b7316d
commit
ecb2b95b1c
11
lib/http.c
11
lib/http.c
@ -107,11 +107,11 @@
|
|||||||
*/
|
*/
|
||||||
bool static checkheaders(struct UrlData *data, char *thisheader)
|
bool static checkheaders(struct UrlData *data, char *thisheader)
|
||||||
{
|
{
|
||||||
struct HttpHeader *head;
|
struct curl_slist *head;
|
||||||
size_t thislen = strlen(thisheader);
|
size_t thislen = strlen(thisheader);
|
||||||
|
|
||||||
for(head = data->headers; head; head=head->next) {
|
for(head = data->headers; head; head=head->next) {
|
||||||
if(strnequal(head->header, thisheader, thislen)) {
|
if(strnequal(head->data, thisheader, thislen)) {
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -280,6 +280,7 @@ CURLcode http(struct connectdata *conn)
|
|||||||
http->p_accept = "Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*\r\n";
|
http->p_accept = "Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*\r\n";
|
||||||
|
|
||||||
do {
|
do {
|
||||||
|
struct curl_slist *headers=data->headers;
|
||||||
sendf(data->firstsocket, data,
|
sendf(data->firstsocket, data,
|
||||||
"%s " /* GET/HEAD/POST/PUT */
|
"%s " /* GET/HEAD/POST/PUT */
|
||||||
"%s HTTP/1.0\r\n" /* path */
|
"%s HTTP/1.0\r\n" /* path */
|
||||||
@ -362,11 +363,11 @@ CURLcode http(struct connectdata *conn)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
while(data->headers) {
|
while(headers) {
|
||||||
sendf(data->firstsocket, data,
|
sendf(data->firstsocket, data,
|
||||||
"%s\015\012",
|
"%s\015\012",
|
||||||
data->headers->header);
|
headers->data);
|
||||||
data->headers = data->headers->next;
|
headers = headers->next;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(data->bits.http_post || data->bits.http_formpost) {
|
if(data->bits.http_post || data->bits.http_formpost) {
|
||||||
|
@ -390,7 +390,7 @@ struct UrlData {
|
|||||||
char *newurl; /* This can only be set if a Location: was in the
|
char *newurl; /* This can only be set if a Location: was in the
|
||||||
document headers */
|
document headers */
|
||||||
|
|
||||||
struct HttpHeader *headers; /* linked list of extra headers */
|
struct curl_slist *headers; /* linked list of extra headers */
|
||||||
struct HttpPost *httppost; /* linked list of POST data */
|
struct HttpPost *httppost; /* linked list of POST data */
|
||||||
|
|
||||||
char *cert; /* PEM-formatted certificate */
|
char *cert; /* PEM-formatted certificate */
|
||||||
|
Loading…
Reference in New Issue
Block a user