The Referer is not sent when I navigate a site using the Site Navigation toolbar. I have a toolbar which include a link to http://validator.w3.org/check/referer but it doesn't work since Referer is not sent when I press the link in the Site Navigation toolbar. build 20020111
Adding to the linktoolbar-uber-meta-bug. This seems like a valid bug, and it seems to be related to the issue that keeps coming up: There is no way to programmatically (using XP-connectable JS interfaces) do the exact same thing that clicking on an <a href> link does. This covers things like target="foo" and security checks as well as supplying a referer. Ideally I'd like to see this fixed by exposing the exact operation, equivalent to clicking on an <a href> link, to some JS-accessible interface (nsIWebNavigation?).
this bug then belongs to the site navigation folks... they need to ensure that they are setting an referring URL on the http channel that gets created as a result of the link click. see nsIHttpChannel::SetReferrer for details. perhaps the solution is just a matter of poking docshell in the right way?!? -> XP Apps for starters... i don't know who owns the Site Navigation Toolbar
Assignee: darin → trudelle
Component: Networking: HTTP → XP Apps
QA Contact: tever → sairuh
XPApps is right afaik. The issue is that we use nsIWebNavigation to click the link, and last time I checked that didn't support "target", security checks, or referer, so all those things have to be done manually. Right now we just do the security checks.
->rpotts, who seems to own the interface at least.
Assignee: trudelle → rpotts
The attached patch fixes this bug, but depends on the infrastructure added in the patch that fixes bug 48902. With that in mind, Stuart, would you review? Taking bug
Assignee: rpotts → bzbarsky
Depends on: 48902
OS: Windows 2000 → All
Priority: -- → P2
Hardware: PC → All
Target Milestone: --- → mozilla0.9.9
I don't suppose you want to implement the same magic for "target", do you? :) The patch looks good, but since I don't have the capability to build I'll have to wait till bug 48902 appears in nightlies before I can test this. I'll do a full review then. Do you have any answer to my comment #1 - as to why it's so damn hard to emulate the (seemingly trivial) behavior of "clicking a link" from JS? I can't help but feel that it's something that comes up often enough that it should be a simple API: eg document.loadURI(href, target) that would do the security check, set the referer, use the right target frame/window, and all that stuff that we currently have to work so hard to get right. IMHO, the behavior when a user *actually* clicks a link should go through the same codepath as when it's invoked programmatically, eg by the linktoolbar.
Stuart: I think you should file a bug about that issue...
Comment on attachment 65797 [details] [diff] [review] Patch to fix adding target is simple enough. Will do once bug 48902 lands, since the change will cause conflicts with that patch.
Attachment #65797 - Attachment is obsolete: true
Comment on attachment 65797 [details] [diff] [review] Patch to fix OK. well, looks like I got confused. There is no scriptable way to set target yet... can we fix this and file a separate bug (on rpotts) to support a scriptable target? reviews, again?
Attachment #65797 - Attachment is obsolete: false
Priority: P2 → P1
Summary: Referer not sent when using the Site Navigation toolbar → [FIX]Referer not sent when using the Site Navigation toolbar
Comment on attachment 65797 [details] [diff] [review] Patch to fix r=choess
Attachment #65797 - Flags: review+
Comment on attachment 65797 [details] [diff] [review] Patch to fix sr=blake
Attachment #65797 - Flags: superreview+
checked into trunk
Status: NEW → RESOLVED
Last Resolved: 17 years ago
Resolution: --- → FIXED
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.