Replacing one of the internal headers with one that has no contents will now
completely disable that header to get sent.
This commit is contained in:
parent
9d5c6df788
commit
1cf13c825f
19
lib/http.c
19
lib/http.c
@ -399,9 +399,22 @@ CURLcode http(struct connectdata *conn)
|
|||||||
}
|
}
|
||||||
|
|
||||||
while(headers) {
|
while(headers) {
|
||||||
sendf(data->firstsocket, data,
|
char *ptr = strchr(headers->data, ':');
|
||||||
"%s\015\012",
|
if(ptr) {
|
||||||
headers->data);
|
/* we require a colon for this to be a true header */
|
||||||
|
|
||||||
|
ptr++; /* pass the colon */
|
||||||
|
while(*ptr && isspace(*ptr))
|
||||||
|
ptr++;
|
||||||
|
|
||||||
|
if(*ptr) {
|
||||||
|
/* only send this if the contents was non-blank */
|
||||||
|
|
||||||
|
sendf(data->firstsocket, data,
|
||||||
|
"%s\015\012",
|
||||||
|
headers->data);
|
||||||
|
}
|
||||||
|
}
|
||||||
headers = headers->next;
|
headers = headers->next;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user