User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8) Gecko/20051111 Firefox/1.5 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8) Gecko/20051111 Firefox/1.5 I'm not entirely sure this is a bug or a design decision, but I could not find any information on this in bugzilla or via google. I've noticed when surfing Google and it prefetches a site, that it will send the 'X-moz: prefetch' header. However, if the url it fetches is a redirect it does not include this 'X-moz' header when accessing the redirect page. Reproducible: Always Steps to Reproduce: You should be able to just setup a prefetched link in some html that points to a url that redirects to another page. On the second access in the prefetch process you will see that 'X-moz: prefetch' is not included in the header. Something like: <link rel="prefetch" href="http://www.xyz.com/"> and let's say http://www.xyz.com/ redirects to: http://www.xyz.com/mypage.html Actual Results: No X-moz header sent for mypage.html. Expected Results: I think the X-moz header might need to be there.
Created attachment 209444 [details] [diff] [review] v1 patch Simple patch. I also noticed that nsPrefetchService::mCurrentChannel is not updated when we process a redirect. I think it should be updated since nsPrefetchService::StopProcessing calls Cancel on mCurrentChannel.
Comment on attachment 209444 [details] [diff] [review] v1 patch + // HTTP request headers are not automatically forwarded to the new channel. maybe there should be a way to do that though... but ok, r=biesi
> maybe there should be a way to do that though... but ok, r=biesi yeah, this is not the first time we've hit a problem like this.
Comment on attachment 209444 [details] [diff] [review] v1 patch approved for 1.8.0 branch, a=dveditz
Marking [rft-dl] (ready for testing in Firefox 184.108.40.206 release candidates). Whoever tests this, please attach the html page with the prefetch link to this bug as a testcase