referrer not sent when loading - loadUri(String uri, String referrer, int flags)

RESOLVED FIXED in Firefox 68

Status

defect
P1
normal
RESOLVED FIXED
3 months ago
2 months ago

People

(Reporter: colormatch, Assigned: esawin)

Tracking

67 Branch
mozilla68
Unspecified
All
Dependency tree / graph

Firefox Tracking Flags

(firefox66 wontfix, firefox67 wontfix, firefox68 fixed)

Details

(Whiteboard: [geckoview:fenix:m5])

Attachments

(2 attachments)

User Agent: Mozilla/5.0 (Windows NT 6.2; Win64; x64; rv:66.0) Gecko/20100101 Firefox/66.0

Steps to reproduce:

load a geckoview session with:

geckoSession.loadUri("https://www.whatsmyreferer.com/","www.SomeRef.com",0);

or

geckoSession.loadUri("https://www.whatsmyreferer.com/",Uri.encode("www.SomeRef.com"),0);

Actual results:

Page loads without sent referrer header.

Expected results:

referrer header should have been sent when loading via:

void loadUri(String uri, String referrer, int flags)
Load the given URI with the specified referrer and load type.

void loadUri(Uri uri, Uri referrer, int flags)
Load the given URI with the specified referrer and load type.

That's a regression from bug 1517703, we need to pass a ReferrerInfo.

Blocks: 1517703

Ugh. Clearly we need a test for this too.

Custom tabs will need the referrer, too.

Priority: -- → P1
Whiteboard: [geckoview:fenix:m5]
Assignee: nobody → etoop
Assignee: etoop → esawin

Eugen, does Fennec have this same bug?

Flags: needinfo?(esawin)

Yes, Fennec has been regressed, too. I think Emily is working on that.

Flags: needinfo?(esawin) → needinfo?(etoop)

Gijs, you've done the original review for the ReferrerInfo usage conversion, can you redirect your review to someone suitable in the respect?

Flags: needinfo?(gijskruitbosch+bugs)

(In reply to Eugen Sawin [:esawin] from comment #8)

Gijs, you've done the original review for the ReferrerInfo usage conversion, can you redirect your review to someone suitable in the respect?

snorp was already listed as a reviewer, that seemed OK to me?

Flags: needinfo?(gijskruitbosch+bugs) → needinfo?(esawin)

(In reply to :Gijs (he/him) from comment #9)

(In reply to Eugen Sawin [:esawin] from comment #8)

Gijs, you've done the original review for the ReferrerInfo usage conversion, can you redirect your review to someone suitable in the respect?

snorp was already listed as a reviewer, that seemed OK to me?

It's probably OK, but I wanted to make sure that I'm using the new loadUri API correctly, snorp was tagged for the "is this correct for GV" part.

Flags: needinfo?(esawin)

(In reply to Eugen Sawin [:esawin] from comment #10)

It's probably OK, but I wanted to make sure that I'm using the new loadUri API correctly

Assuming browser is an instance of the CE in browser-custom-element.js, yes.

In fact, how does that call work today? :-\

Pushed by esawin@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/f7323ab06d60
[1.0] Use ReferrerInfo when loading URIs in GeckoView. r=snorp
https://hg.mozilla.org/integration/autoland/rev/c8216edb37a9
[2.0] Add GeckoSession.loadUri() referrer test. r=snorp
Status: UNCONFIRMED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68
Blocks: 1549732
Flags: needinfo?(etoop)
You need to log in before you can comment on or make changes to this bug.