[Webkit-unassigned] [Bug 27267] New: HTTP Accept header gives preference of XML over HTML

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jul 14 10:33:07 PDT 2009


https://bugs.webkit.org/show_bug.cgi?id=27267

           Summary: HTTP Accept header gives preference of XML over HTML
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: PC
               URL: http://newmediacampaigns.com/page/webkit-team-admits-a
                    ccept-header-error
        OS/Version: All
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: WebCore Misc.
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: krisjordan at gmail.com


For developers wanting to use the HTTP protocol to implement RESTful content
negotiation where resources can be represented as HTML or XML WebKit
unhelpfully prefers XML over HTML. Marciej has acknowledged this error: 

"Most WebKit-based browsers (and Safari in particular) would probably do a
better job rendering HTML than XHTML or generic XML, if only because the code
paths are much better tested. So the Accept header is somewhat in error."

Here is a demo URL that will be opened in XML in WebKit and HTML in Firefox 3+: 
http://recessframework.org/demo/content-negotiation/tweet

The accept header appears to be defined on line 200 of
WebCore/loader/FrameLoader.cpp

I recommend two alternatives:

Copy Firefox 3.5's:
text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
or
Simplify: text/html,*/*

For more background information please see:
http://newmediacampaigns.com/page/browser-rest-http-accept-headers
http://newmediacampaigns.com/page/webkit-team-admits-accept-header-error

Thanks!

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list