Skip to content

Commit 93e32e6

Browse files
committed
Modified the default HTTP Accept: header to only be Accept: */*
1 parent f8a5ec1 commit 93e32e6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

97 files changed

+140
-140
lines changed

lib/http.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1230,7 +1230,7 @@ CURLcode Curl_http(struct connectdata *conn)
12301230
http->p_pragma = "Pragma: no-cache\r\n";
12311231

12321232
if(!checkheaders(data, "Accept:"))
1233-
http->p_accept = "Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*\r\n";
1233+
http->p_accept = "Accept: */*\r\n";
12341234

12351235
if(( (HTTPREQ_POST == data->set.httpreq) ||
12361236
(HTTPREQ_POST_FORM == data->set.httpreq) ||

tests/data/test1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ http://%HOSTIP:%HOSTPORT/1
4141
GET /1 HTTP/1.1
4242
Host: 127.0.0.1:8999
4343
Pragma: no-cache
44-
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*
44+
Accept: */*
4545

4646
</protocol>
4747
</verify>

tests/data/test10

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ the
4343
PUT /we/want/10 HTTP/1.1
4444
Host: 127.0.0.1:8999
4545
Pragma: no-cache
46-
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*
46+
Accept: */*
4747
Content-Length: 78
4848

4949
Weird

tests/data/test11

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,12 @@ http://%HOSTIP:%HOSTPORT/want/11 -L
5656
GET /want/11 HTTP/1.1
5757
Host: 127.0.0.1:8999
5858
Pragma: no-cache
59-
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*
59+
Accept: */*
6060

6161
GET /want/data/110002.txt?coolsite=yes HTTP/1.1
6262
Host: 127.0.0.1:8999
6363
Pragma: no-cache
64-
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*
64+
Accept: */*
6565

6666
</protocol>
6767
</verify>

tests/data/test12

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ GET /want/12 HTTP/1.1
4141
Range: bytes=100-200
4242
Host: 127.0.0.1:8999
4343
Pragma: no-cache
44-
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*
44+
Accept: */*
4545

4646
</protocol>
4747
</verify>

tests/data/test13

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ http://%HOSTIP:%HOSTPORT/want/13 -X DELETE
3131
DELETE /want/13 HTTP/1.1
3232
Host: 127.0.0.1:8999
3333
Pragma: no-cache
34-
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*
34+
Accept: */*
3535

3636
</protocol>
3737
</verify>

tests/data/test14

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ HEAD /want/14 HTTP/1.1
3131
User-Agent: curl/7.4.2-pre4 (sparc-sun-solaris2.7) libcurl 7.4.2-pre4
3232
Host: 127.0.0.1:8999
3333
Pragma: no-cache
34-
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*
34+
Accept: */*
3535

3636
</protocol>
3737
</verify>

tests/data/test15

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ http://127.0.0.1:8999/want/15 200 26
4343
GET /want/15 HTTP/1.1
4444
Host: 127.0.0.1:8999
4545
Pragma: no-cache
46-
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*
46+
Accept: */*
4747

4848
</protocol>
4949
</verify>

tests/data/test16

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ GET http://we.want.that.site.com/16 HTTP/1.1
3535
Proxy-authorization: Basic ZmFrZUB1c2VyOqenp2xvb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29uZw==
3636
Host: we.want.that.site.com
3737
Pragma: no-cache
38-
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*
38+
Accept: */*
3939

4040
</protocol>
4141
</verify>

tests/data/test17

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ MOOO /that.site.com/17 HTTP/1.1
4040
User-Agent: agent007 license to drill
4141
Host: 127.0.0.1:8999
4242
Pragma: no-cache
43-
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*
43+
Accept: */*
4444

4545
</protocol>
4646
</verify>

0 commit comments

Comments
 (0)