[Webkit-unassigned] [Bug 10313] xsl:import and document() don't work in stylesheets loaded via XMLHttpRequest

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Sep 2 05:04:15 PDT 2010


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


Martin Blom <martin at blom.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |martin at blom.org




--- Comment #65 from Martin Blom <martin at blom.org>  2010-09-02 05:04:13 PST ---
(In reply to comment #62)
> First question - what does Firefox do? I can imagine several options for the Referer header:
> - XMLHttpRequest request URL;
> - XMLHttpRequest response URL (after redirects);
> - taken from the document that created XMLHttpRequest;
> - taken from the document that invoked XMLHttpRequest.responseXML;
> - taken from the document that created XSLTProcessor;
> - taken from the document that invoked XSLTProcessor.transformToDocument();
> - no Referer sent at all.
> 
> We should investigate doing the same. If that proves too tricky, maybe it can wait until a follow-up patch.

If "main-redirect.cgi" redirects to "main.xsl" and "child-1-redirect.cgi" redirects to "child-1.xsl", using XHR to load the XSLT stylesheet main-redirect.cgi, which imports "child-1-redirect.cgi", which in turn includes "child-2.xsl", the following requests are seen in Firefox 3.6.7:

GET /lcs/xslt-referrer/main-redirect.cgi (XHR)
Referer: http://localhost/lcs/xslt-referrer/

GET /lcs/xslt-referrer/main.xsl (XHR)
Referer: http://localhost/lcs/xslt-referrer/

GET /lcs/xslt-referrer/child-1-redirect.cgi (main XSLT)
Referer: http://localhost/lcs/xslt-referrer/main.xsl

GET /lcs/xslt-referrer/child-1.xsl (main XSLT)
Referer: http://localhost/lcs/xslt-referrer/main.xsl

GET /lcs/xslt-referrer/child-2.xsl (child 1 XSLT)
Referer: http://localhost/lcs/xslt-referrer/child-1-redirect.cgi

That is, when main.xsl loads the child, the redirected URI is used as referrer, but when a child loads another child, the URI specified in the stylesheet is used. (Interestingly, the main-loads-child and child-loads-child requests cannot be seen in Firebug.)

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