Closed Bug 1282878 Opened 10 years ago Closed 10 years ago

HTTP request for link rel=icon does not include Referer field in request headers

Categories

(Core :: DOM: HTML Parser, defect)

47 Branch
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 333811

People

(Reporter: an72, Unassigned)

Details

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:47.0) Gecko/20100101 Firefox/47.0 Build ID: 20160608013412 Steps to reproduce: My website pages include a <link rel=icon ...> element. Actual results: Reviewing the request headers FF sends, it includes the page URL as the Referer for <link rel=stylesheet> elements, also for <script src=...> elements, and of course <img> elements; all of which seems correct/appropriate. However, it does not include a Referer field when sending a request for the <link rel=icon> resource. (Just for other-browser information, chromium does include the the page URL in the Referer field for <link rel=icon> requests.) [On a separate side-note, I also don't understand why the Accept header for the <link rel=icon> looks like: Accept = 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' (I understand the */* still allows a fairly high quality factor for images.) Shouldn't it primarily be looking for/expecting some type of image?] Expected results: For browser server requests for <link rel=icon> resources, I would expect similar behavior to other page resources, with a Referer request header with the page URL.
Component: Untriaged → Networking: HTTP
Necko is not directly responsible for placing the Referrer request header. This is more a browser or html parser bug. I personally don't know were from the request is even actually made.
Component: Networking: HTTP → HTML: Parser
Boris, do you know where our rel=icon implementation is?
Flags: needinfo?(bzbarsky)
<http://searchfox.org/mozilla-central/rev/bfcc10319e4e3ce78367fa9bba9316f7eb5248b6/toolkit/components/places/FaviconHelpers.cpp#402>. Note that this code doesn't live inside Gecko; it lives in the Firefox UI. But anyway this is a dup. > I also don't understand why the Accept header for the <link rel=icon> looks like Because that's the default Accept header we send and the icon-fetching code doesn't change it...
Status: UNCONFIRMED → RESOLVED
Closed: 10 years ago
Flags: needinfo?(bzbarsky)
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.