Created attachment 447600 [details] Screencast showing requests and missing referer header When opening links in a new tab, the Referer header is not sent. Steps to reproduce the problem: 1. Go to https://mskelton.github.io/chromium-bug 2. Right click on GitHub link 3. Click Open Link in New Tab 4. Notice that the Referer header is missing in the request This occurs both for cmd+click and right click -> Open in New Tab and is the case for both same origin and cross origin links.
<rdar://problem/86937817>
It is not clear to me here that this is a bug and that we are expected to send a referrer header here. How is that different from copying the link URL, opening a new tab and pasting the URL in the URL bar (which is basically what this menu action does)?
(In reply to Chris Dumez from comment #2) > It is not clear to me here that this is a bug and that we are expected to > send a referrer header here. > > How is that different from copying the link URL, opening a new tab and > pasting the URL in the URL bar (which is basically what this menu action > does)? Other browsers correctly attach the Referer header when opening links in a new tab (save for a minor bug in Chrome) so I would hope Webkit would follow suit to be consistent.
(In reply to Mark Skelton from comment #3) > (In reply to Chris Dumez from comment #2) > > It is not clear to me here that this is a bug and that we are expected to > > send a referrer header here. > > > > How is that different from copying the link URL, opening a new tab and > > pasting the URL in the URL bar (which is basically what this menu action > > does)? > > Other browsers correctly attach the Referer header when opening links in a > new tab (save for a minor bug in Chrome) so I would hope Webkit would follow > suit to be consistent. Yes, if other browsers do so, it is pretty good justification for us to do the same indeed.
Ok, here is a better test repro: - https://codepen.io/cdumez/pen/poWKzxV 1. Right-click link > open in new tab 2. Notice that there is no referrer printed out in Safari but there is one in both Chrome and Firefox.
(In reply to Chris Dumez from comment #5) > Ok, here is a better test repro: > - https://codepen.io/cdumez/pen/poWKzxV > > 1. Right-click link > open in new tab > 2. Notice that there is no referrer printed out in Safari but there is one > in both Chrome and Firefox. This appears to be a Safari issue though, not a WebKit one. If I use WebKit's mini browser and click "open in new window", then I see a referrer. The problem is that Safari hijacks the context menu and has its own actions in there. Those "Open Link in..." actions do not send a referrer header.
This is actually: <rdar://3413260> It is apparently standard Safari behavior since 2003.
Mark: Just to be clear, you are reporting a problem in the Safari client of WebKit, which chooses to implement its own 'Open Link In' behavior that does not include the header. I am resolving this as 'Moved', since it needs to be fixed in the Safari client. That problem is tracked in Safari under rdar://3413260.