replaceState does not update referrer information

NEW
Unassigned

Status

()

Core
Document Navigation
4 years ago
4 years ago

People

(Reporter: gabriel, Unassigned)

Tracking

28 Branch
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [bugday-20140210])

Attachments

(1 attachment)

777 bytes, application/zip
Details
(Reporter)

Description

4 years ago
Created attachment 8370274 [details]
test case

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:28.0) Gecko/20100101 Firefox/28.0 (Beta/Release)
Build ID: 20131213004002

Steps to reproduce:

When changing the current state, the URL is reflected on the address bar, but any request made from that page will still see the old URL.

1. visit a page at /index.html
2. updateState to change the current url to /new.html
3. create an iframe on the document
4. on that iframe, print document.referrer


Actual results:

document.referrer == /index.html
(mismatches url in address bar)


Expected results:

document.referrer == /new.html
(match the URL displayed in address bar)
(Reporter)

Updated

4 years ago
OS: Windows 7 → All
Hardware: x86_64 → All

Comment 1

4 years ago
I don't understand it (the testcase just keeps "loading"), but maybe related to bug 631949.
Component: Untriaged → Document Navigation
Product: Firefox → Core
Whiteboard: [bugday-20140210]
We get the referrer from mOwnerContent->NodePrincipal(), which isn't affected by pushState calls.

The spec specifies that you use the document address, but that gives incorrect behavior for loads from about:blank.  Need to get the spec sorted out here...
Status: UNCONFIRMED → NEW
Ever confirmed: true
You need to log in before you can comment on or make changes to this bug.