mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-25 05:27:00 +03:00
[project @ 2006-02-13 23:04:32 by bursa]
Disable sending of Expect: 100-continue for POSTs (fixes using the bug tracker). Remove unnecessary setting of Host header. svn path=/import/netsurf/; revision=2080
This commit is contained in:
parent
a784d112c5
commit
07d55db910
@ -319,6 +319,11 @@ struct fetch * fetch_start(char *url, char *referer,
|
||||
/* remove curl default headers */
|
||||
APPEND(fetch->headers, "Accept:");
|
||||
APPEND(fetch->headers, "Pragma:");
|
||||
|
||||
/* when doing a POST libcurl sends Expect: 100-continue" by default
|
||||
* which fails with lighttpd, so disable it (see bug 1429054) */
|
||||
APPEND(fetch->headers, "Expect:");
|
||||
|
||||
if (option_accept_language) {
|
||||
char s[80];
|
||||
snprintf(s, sizeof s, "Accept-Language: %s, *;q=0.1",
|
||||
@ -326,13 +331,7 @@ struct fetch * fetch_start(char *url, char *referer,
|
||||
s[sizeof s - 1] = 0;
|
||||
APPEND(fetch->headers, s);
|
||||
}
|
||||
/* Ensure that the Host header is set */
|
||||
{
|
||||
char s[80];
|
||||
snprintf(s, sizeof s, "Host: %s", host);
|
||||
s[sizeof s - 1] = 0;
|
||||
APPEND(fetch->headers, s);
|
||||
}
|
||||
|
||||
/* And add any headers specified by the caller */
|
||||
for (i = 0; headers[i]; i++) {
|
||||
if (strncasecmp(headers[i], "If-Modified-Since:", 18) == 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user