Bug 12296

Summary: Proposed new Accept HTTP header
Product: WebKit Reporter: Nicholas Shanks <nickshanks>
Component: Page LoadingAssignee: Nobody <webkit-unassigned>
Severity: Normal CC: ap, ddkilzer
Priority: P2    
Version: 420+   
Hardware: Mac   
OS: OS X 10.4   
Description Flags
new accept header none

Description Nicholas Shanks 2007-01-16 15:03:24 PST
I would like people to comment on the attached diff. I think it would be beneficial to add image/svg+xml as a requested image type, to remove the generic XML types (they are still matched by */*), and to make HTML preferred over XHTML (since HTML is better tested).
If a content provider has both HTML and XHTML versions, and they are not equivalent, they can set a qs (source quality) value to boost the XHTML version in negotiation.
Comment 1 Nicholas Shanks 2007-01-16 15:04:01 PST
Created attachment 12495 [details]
new accept header
Comment 2 Nicholas Shanks 2007-01-16 15:07:57 PST
Oh, and I removed text/plain too, because that's the apache default for formats it's never heard of, like .backup and .temp, and having it override common things like image/jpeg is bad IMHO.
Comment 3 David Kilzer (:ddkilzer) 2007-01-16 18:23:33 PST
It would be interesting to know what other browsers (Firefox, Opera and MSIE) send.

Comment 4 Alexey Proskuryakov 2007-01-16 20:54:15 PST
(In reply to comment #3)

The current string was copied from Firefox verbatim, bug 9572.
Comment 5 Nicholas Shanks 2007-01-17 02:46:55 PST
The current string is sent by FF for it's mainResource, but for <img> sources it sends only "image/png,*/*;q=0.5" and for stylesheets "text/css,*/*;q=0.1".

Opera 9 sends "text/html, application/xml;q=0.9, application/xhtml+xml, image/png, image/jpeg, image/gif, image/x-xbitmap, */*;q=0.1"  for every request.

IE sends "*/*" for normal requests, and "image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-excel, application/msword, application/vnd.ms-powerpoint, */*" for images.

Most feed readers (desktop & web-based) don't send any Accept string. AppleSyndication sends "*/*".

The Google and Yahoo search bots send "*/*"

The MSN bot sends "text/html, text/plain, text/xml, application/*, Model/vnd.dwf, drawing/x-dwf"
Comment 6 Alexey Proskuryakov 2007-01-17 04:10:02 PST
(In reply to comment #5)
> The current string is sent by FF for it's mainResource, but for <img> sources
> it sends only "image/png,*/*;q=0.5" and for stylesheets "text/css,*/*;q=0.1".

Does WebKit send the same string for the main resource and subresources? I believe that would be a regression.
Comment 7 Nicholas Shanks 2007-01-17 05:52:49 PST
WebKit sends "*/*" for all non-mainResource requests.
Comment 8 Nicholas Shanks 2012-11-05 08:31:00 PST
This bug has been fixed in r80776 (bug 27267) and I am content with the patch that was applied.