Bug 9572

Summary: Add application/xhtml+xml to the Accept header
Product: WebKit Reporter: Alexey Proskuryakov <ap>
Component: Page LoadingAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: ian
Priority: P3    
Version: 420+   
Hardware: Mac   
OS: OS X 10.4   
URL: http://ppewww.ph.gla.ac.uk/~flavell/www/content-type.html
Bug Depends on:    
Bug Blocks: 4223    
Attachments:
Description Flags
proposed patch darin: review+

Description Alexey Proskuryakov 2006-06-25 00:05:14 PDT
Currently, WebKit sends */* as its Accept header. A common technique for servers is to refrain from sending XHTML in this case, because this is what clients lacking XHTML support (such as IE) send.

This is what Firefox sends for the main resource:
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Comment 1 Alexey Proskuryakov 2006-07-07 10:17:44 PDT
See also: bug 9426.
Comment 2 Alexey Proskuryakov 2006-07-07 10:57:59 PDT
Created attachment 9254 [details]
proposed patch

I am not aware of any reason for us to send something else than Firefox does in the Accept header, so I've just copied theirs.
Comment 3 Darin Adler 2006-07-07 16:27:41 PDT
Comment on attachment 9254 [details]
proposed patch

What's supplying our current Accept header value?
Comment 4 Alexey Proskuryakov 2006-07-08 00:54:50 PDT
(In reply to comment #3)
I couldn't find it in WebCore or WebKit, so it must be NSURLConnection itself.
Comment 5 Darin Adler 2006-07-08 05:50:47 PDT
Comment on attachment 9254 [details]
proposed patch

This new string will need to be added to StringNotToBeLocalized.txt.

r=me
Comment 6 Alexey Proskuryakov 2006-07-08 23:59:04 PDT
(In reply to comment #5)
> This new string will need to be added to StringNotToBeLocalized.txt.

Added (also "max-age=0" from a previous patch).

Committed revision 15246.
Comment 7 Alexey Proskuryakov 2006-07-11 12:03:57 PDT
> Committed revision 15246.

.. and 15340 for the test that I missed then.