summaryrefslogtreecommitdiff
path: root/content/fetch.c
diff options
context:
space:
mode:
authorJames Bursa <james@netsurf-browser.org>2006-02-13 23:04:32 +0000
committerJames Bursa <james@netsurf-browser.org>2006-02-13 23:04:32 +0000
commit07d55db910095415d15cc2b6509fd44efa79a875 (patch)
tree7f25f6cc9163b0711be20ad96102c053ffaad6bc /content/fetch.c
parenta784d112c5559e13b4a012ffa37b447ddd20b84c (diff)
downloadnetsurf-07d55db910095415d15cc2b6509fd44efa79a875.tar.gz
netsurf-07d55db910095415d15cc2b6509fd44efa79a875.tar.bz2
[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
Diffstat (limited to 'content/fetch.c')
-rw-r--r--content/fetch.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/content/fetch.c b/content/fetch.c
index bbe4d3402..b63bf5f91 100644
--- a/content/fetch.c
+++ b/content/fetch.c
@@ -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) {