Closed Bug 1732305 Opened 3 years ago Closed 3 years ago

Last parameter in a GET request not shown

Categories

(DevTools :: Netmonitor, defect, P2)

Firefox 92
defect

Tracking

(firefox95 fixed)

RESOLVED FIXED
95 Branch
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)

Attached image problem.png

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

Attached image no_problem.png

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.

Component: Untriaged → Netmonitor
Product: Firefox → DevTools

Setting P2/S3, this might happen with various query parameter names which conflict with internal devtools code.

Severity: -- → S3
Status: UNCONFIRMED → NEW
Ever confirmed: true
Priority: -- → P2

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.

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,
       };
     }
Keywords: good-first-bug

Hello everybody, I am an Outreachy applicant, can I try and work on this?

Sure! i've assigned it to you.

Thanks

Assignee: nobody → alevanni19
Whiteboard: dt-outreachy-2020
Whiteboard: dt-outreachy-2020 → dt-outreachy-2021

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!

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

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

Hi Alessia,
No nothing needed from you anymore for this bug.

Thanks

Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 95 Branch
Regressions: 1736036

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

(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

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: