[Webkit-unassigned] [Bug 62110] New: Should set Accept header to object/@type when fetching remote object

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Jun 5 10:34:13 PDT 2011


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

           Summary: Should set Accept header to object/@type when fetching
                    remote object
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Unspecified
        OS/Version: Unspecified
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: SVG
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: webkit.org at masklinn.net
                CC: zimmermann at kde.org


Created an attachment (id=96052)
 --> (https://bugs.webkit.org/attachment.cgi?id=96052&action=review)
Short WSGIREF script testing the MIME type sent by the browser when fetching a remote resource linked from an object tag

object/@type is an optional attribute providing the MIME type of the content. When fetching a remote object and if @type is set (and a valid MIME type), Webkit should send it to the remote host.

Why:
Content negotiation of multi-format resources, especially between textual and image formats

Use case:
I was working on a floor plan demo/API, and most of the floor plan resources were to be made available in a number of formats: an HTML page for details and sub-resources, a JSON for JS code and an image for visualization. I tried to use *object[@type='image/svg+xml']* so that the server side could just return the resource in the format clients liked most, in what I understand to be a RESTful manner.

Expected:
Webkit uses object/@type to set the Accept header of the resource when object/@data points to a remote resource, if @type is a valid MIME type (or looks like one), do one of:
* Set Accept to object/@type directly
* Use @type to craft a better Accept (with correct priorities) if @type is a subtyped MIME: @type='image/svg+xml' would yield the Accept 'image/svg+xml,image/*;q=0.9,*/*;q=0.8*'
* Put the content of object/@type at the front of the Accept header

Observed:
Webkit does not seem to care for @type, and always sends the same Accept header: 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8'

Testing:
Attached a Python script (compatible 2 & 3) which launches a very simple WSGI application via WSGIREF. Simply browse to http://localhost:8000, it will assert if the Accept header used when requesting a resource matches the @type of the object tag which linked to this resource, and will display the header's value in red if it does not.

-- 
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