Last parameter in a GET request not shown
Categories
(DevTools :: Netmonitor, defect, P2)
Tracking
(firefox95 fixed)
Tracking | Status | |
---|---|---|
firefox95 | --- | fixed |
People
(Reporter: ilhan, Assigned: alevanni19)
References
(Blocks 1 open bug)
Details
(Keywords: good-first-bug, Whiteboard: dt-outreachy-2021)
Attachments
(4 files)
User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:92.0) Gecko/20100101 Firefox/92.0
Steps to reproduce:
In the UI side, which is AngularJS I have started searching a user called Zlatimir. Then I have looked at Network events -> XHR -> Headers -> GET
Actual results:
I was unable to see the last parameter which was &query=Zlatimir
Expected results:
I should be able to see &query=Zlatimir
Reporter | ||
Comment 1•3 years ago
|
||
Comment 2•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.
Comment 3•3 years ago
|
||
Setting P2/S3, this might happen with various query parameter names which conflict with internal devtools code.
Updated•3 years ago
|
Comment 4•3 years ago
|
||
So the issue here is that in the UrlPreview Component There is an internal root property called query
which holds all the URL query parameters. This property to determine where to add a horizontal splitter before rendering the Url query parameters here https://searchfox.org/mozilla-central/rev/f62d42b1d98e67dc3da05d586f71103df02b8c4a/devtools/client/netmonitor/src/components/previews/UrlPreview.js#89-97.
As we can see the check is very loose, so if any a parameters have the name query
rather than it been rendered a splitter would be generated.
Comment 5•3 years ago
|
||
To fix we just need to be more strict with by also checking the query
property is on
diff --git a/devtools/client/netmonitor/src/components/previews/UrlPreview.js b/devtools/client/netmonitor/src/components/previews/UrlPreview.js
--- a/devtools/client/netmonitor/src/components/previews/UrlPreview.js
+++ b/devtools/client/netmonitor/src/components/previews/UrlPreview.js
@@ -84,9 +84,9 @@ class UrlPreview extends Component {
renderRow(props) {
const {
- member: { name },
+ member: { name, level },
} = props;
- if (name == "query" || name == "remote") {
+ if ((name == "query" || name == "remote") && level == 1) {
return tr(
{ key: name, className: "treeRow stringRow" },
td(
@@ -191,7 +191,8 @@ class UrlPreview extends Component {
[L10N.getStr("netmonitor.headers.address")]: address,
};
}
Assignee | ||
Comment 6•3 years ago
|
||
Hello everybody, I am an Outreachy applicant, can I try and work on this?
Comment 7•3 years ago
|
||
Sure! i've assigned it to you.
Thanks
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Assignee | ||
Comment 8•3 years ago
|
||
Assignee | ||
Comment 9•3 years ago
|
||
Hello everybody,
I made the modification showed on comment 5 and I submitted it for review.
I remain at your disposal for any clarification, or if any other action is needed.
Thank you and have a nice day!
Assignee | ||
Comment 10•3 years ago
|
||
Depends on D128338
Comment 11•3 years ago
|
||
Pushed by hmanilla@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/f5ba81ab4904 Last parameter in a GET request not shown r=bomsy,Honza https://hg.mozilla.org/integration/autoland/rev/ec491b0096ff Last parameter in a GET request not shown - Test added - r=bomsy,Honza
Assignee | ||
Comment 12•3 years ago
|
||
Hello everybody, I saw that both the revisions associated with the bug have been closed, is there any other action required on my side?
Thank you again for you help,
Alessia
Comment 13•3 years ago
|
||
Hi Alessia,
No nothing needed from you anymore for this bug.
Thanks
Comment 14•3 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/f5ba81ab4904
https://hg.mozilla.org/mozilla-central/rev/ec491b0096ff
Assignee | ||
Comment 15•3 years ago
|
||
Hello,
I saw that my patch causes the regression 1736036.
I am looking into it, but I don't really know how to proceed, any suggestions? I suppose the file to correct is devtools/client/netmonitor/test/browser_net_url-preview.js .
Thank you in advance,
Alessia
Comment 16•3 years ago
|
||
(In reply to Alessia Vanni from comment #15)
I suppose the file to correct is devtools/client/netmonitor/test/browser_net_url-preview.js .
That's correct.
You can run the test locally on your machine:
mach test devtools/client/netmonitor/test/browser_net_url-preview.js
Let's continue the discussion in the other bug
Description
•