For "Network.requestWillBeSent" a possible URL hash needs to be included in "request.urlFragment" and not "request.url"
Categories
(Remote Protocol :: CDP, defect, P3)
Tracking
(firefox104 fixed)
Tracking | Status | |
---|---|---|
firefox104 | --- | fixed |
People
(Reporter: z, Assigned: whimboo)
References
Details
Attachments
(1 file)
User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:89.0) Gecko/20100101 Firefox/89.0
Steps to reproduce:
- Connect to the Remote Protocol and run
Network.enable
. - Load a document in an iframe with a hash URL, like
http://localhost:43029/hash.html#foo
.
Actual results:
The ensuing Network.requestWillBeSent
event will have a request.url
property of http://localhost:43029/hash.html#foo
.
Expected results:
The ensuing Network.requestWillBeSent
event should have a request.url
property of ``http://localhost:43029/hash.html`, and #foo
in the `request.urlFragment` property.
The CDP description for Network.request.url
:
Request URL (without fragment).
Comment 1•3 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'DevTools::Netmonitor' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.
Reporter | ||
Updated•3 years ago
|
Assignee | ||
Comment 2•3 years ago
|
||
Thanks Zach for reporting. It should actually be a simple change that needs to be done here:
https://searchfox.org/mozilla-central/rev/79d73b4aff88dd4a0f06dd3789e1148c49b0de60/remote/cdp/domains/parent/Network.jsm#386-387
When doing that adding a test would be great too.
Zach, how important is that for your use cases?
Reporter | ||
Comment 3•3 years ago
|
||
The importance is low because we can easily work around it (if (url.includes('#')) url = url.slice(0, url.indexOf('#'))
), but it would be nice to not have to do that. So it's a "nice to have" for Cypress.
This is being used for Cypress's new/upcoming HTTP features - we are using Network.requestWillBeSent
to correlate metadata that only the browser knows about requests (initiator, resource type, etc) with the actual HTTP requests that come through our proxy, which unlocks some new functionality that is handy for testing. PR if you're curious: https://github.com/cypress-io/cypress/pull/16835
Reporter | ||
Comment 4•3 years ago
|
||
- Removed the fragment identifier from
request.url
- Sets
request.urlFragment
to the#fragmentIdentifier
Updated•3 years ago
|
Assignee | ||
Comment 5•3 years ago
|
||
Hi Zach, I have seen that you attached a patch and I also gave some comments on the patch. Will you have the time to apply those? It would be great to see this bug fixed. Thanks!
Reporter | ||
Comment 6•3 years ago
|
||
Hey, I will return to the patch shortly, I was just away from the PC for a couple of weeks. I am getting back into the swing of things, still plan on finishing this. Thanks for the comments!
Assignee | ||
Comment 7•3 years ago
|
||
Sounds good. Thanks Zach!
Updated•3 years ago
|
Assignee | ||
Comment 8•3 years ago
|
||
Hi Zach, I wonder if someone else could pick it up and finish in case you don't have the time for the remaining work. Just let us know. Thanks.
Comment 9•2 years ago
|
||
The bug assignee didn't login in Bugzilla in the last 7 months.
:whimboo, could you have a look please?
For more information, please visit auto_nag documentation.
Assignee | ||
Comment 10•2 years ago
|
||
Not a priority right now and we can check when it's needed.
Comment 11•2 years ago
|
||
Redirect a needinfo that is pending on an inactive user to the triage owner.
:whimboo, could you please find another way to get the information or close the bug as INCOMPLETE
if it is not actionable?
For more information, please visit auto_nag documentation.
Assignee | ||
Comment 12•2 years ago
|
||
Because of the WiP state of the attached patch I didn't see the reply from Zach, and a follow-up on the bug directly never happened. I'll take a look later today.
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Comment 13•2 years ago
|
||
The bug assignee is inactive on Bugzilla, so the assignee is being reset.
Updated•2 years ago
|
Updated•2 years ago
|
Comment 14•2 years ago
|
||
Pushed by hskupin@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/b363ae1f1a6d [CDP] Fix URL fragment handling in Network.requestWillBeSent. r=webdriver-reviewers,jdescottes
Comment 15•2 years ago
|
||
bugherder |
Assignee | ||
Updated•2 years ago
|
Description
•