Closed Bug 1485673 Opened Last year Closed Last year

http-on-modify-request observers can no longer redirect tracking channels when TP is on

Categories

(Core :: Networking: HTTP, defect, P2)

defect

Tracking

()

RESOLVED FIXED
mozilla63
Tracking Status
firefox-esr52 --- unaffected
firefox-esr60 --- unaffected
firefox61 --- unaffected
firefox62 --- unaffected
firefox63 + fixed

People

(Reporter: ehsan, Assigned: ehsan)

References

Details

(Keywords: regression, Whiteboard: [necko-triaged])

Attachments

(1 file, 1 obsolete file)

This is another regression from bug 1478539 that bug 1485182 failed to fix.  In the non-cancelled code path, we handle mAPIRedirectToURI in the beginning of OnBeforeConnect(), but I forgot to handle it in CancelForTrackingProtection() yesterday, and as a result, calling redirectTo() on a channel inside the http-on-modify-request observer notification has no effect.

Patch coming up.
Comment on attachment 9003462 [details] [diff] [review]
Allow tracking channels being redirected from http-on-modify-request observer notifications when tracking protection is turned on

Review of attachment 9003462 [details] [diff] [review]:
-----------------------------------------------------------------

ups!

::: netwerk/protocol/http/nsHttpChannel.cpp
@@ +6064,5 @@
> +    // Check to see if we should redirect this channel elsewhere by
> +    // nsIHttpChannel.redirectTo API request
> +    if (mAPIRedirectToURI) {
> +        return AsyncCall(&nsHttpChannel::HandleAsyncAPIRedirect);
> +    }

and what if this is set asynchronously (while the channel was suspended?)

I think it should be ALSO in ContinueCancelledByTrackingProtection
Attachment #9003462 - Flags: review?(honzab.moz) → review+
Yes, good catch!  I will add a test for that case as well.
Priority: -- → P2
Whiteboard: [necko-triaged]
Depends on: 1485532
Attachment #9003462 - Attachment is obsolete: true
Pushed by eakhgari@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/6d314de878fa
Allow tracking channels being redirected from http-on-modify-request observer notifications when tracking protection is turned on; r=mayhemer
Pushed by eakhgari@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/260c51a609ae
follow-up: Fix lint failures on a CLOSED TREE
https://hg.mozilla.org/mozilla-central/rev/6d314de878fa
https://hg.mozilla.org/mozilla-central/rev/260c51a609ae
Status: NEW → RESOLVED
Closed: Last year
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
You need to log in before you can comment on or make changes to this bug.