aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcorvid <corvid@lavabit.com>2010-02-11 22:48:38 +0000
committercorvid <corvid@lavabit.com>2010-02-11 22:48:38 +0000
commit9ee77838fa74dcb5628ed428d7b61c909b89124e (patch)
treed1748b90d18588cb84b293fe397dc9dff6ea121b
parent41406289c99e0cd17c608ed730b6c75007e9a127 (diff)
send Accept header
I would be more specific than image/* if servers were more likely to pay attention. The purpose for adding this is to go along with the User-Agent change, since I've seen server code disallow queries that are supposedly from Firefox but have no Accept header.
-rw-r--r--ChangeLog2
-rw-r--r--src/IO/http.c2
2 files changed, 4 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index e0b41ab4..0e846755 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,6 +5,8 @@ Dillo project
dillo-2.2.1 [not released yet]
+- Configurable User-Agent HTTP header.
Patch: Alexander Voigt, corvid
++- Include Accept header in HTTP queries.
+ Patch: corvid
-----------------------------------------------------------------------------
diff --git a/src/IO/http.c b/src/IO/http.c
index 67d552c8..1ff7399b 100644
--- a/src/IO/http.c
+++ b/src/IO/http.c
@@ -305,6 +305,7 @@ Dstr *a_Http_make_query_str(const DilloUrl *url, bool_t use_proxy)
query,
"POST %s HTTP/1.1\r\n"
"Connection: close\r\n"
+ "Accept: text/*,image/*,*/*;q=0.2\r\n"
"Accept-Charset: utf-8,*;q=0.8\r\n"
"Accept-Encoding: gzip\r\n"
"%s" /* language */
@@ -329,6 +330,7 @@ Dstr *a_Http_make_query_str(const DilloUrl *url, bool_t use_proxy)
"GET %s HTTP/1.1\r\n"
"%s"
"Connection: close\r\n"
+ "Accept: text/*,image/*,*/*;q=0.2\r\n"
"Accept-Charset: utf-8,*;q=0.8\r\n"
"Accept-Encoding: gzip\r\n"
"%s" /* language */