Closed Bug 1361739 Opened 8 years ago Closed 6 years ago

Params showing wrong in HTTP inspector in specific case

Categories

(DevTools :: Netmonitor, defect, P3)

53 Branch
defect

Tracking

(firefox64 fixed)

RESOLVED FIXED
Firefox 64
Tracking Status
firefox64 --- fixed

People

(Reporter: vedantseta007, Assigned: tossj)

References

()

Details

Attachments

(2 files, 1 obsolete file)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36 Firefox for Android Steps to reproduce: User Agent : Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:53.0) Gecko/20100101 Firefox/53.0 http://randomdomain.com?asd[]=&pr=&asd[]=1&asd[]=2 - Open Console - In HTTP Inspector - Check Params Tab Actual results: Params : asd[] : [2] 0 : "1" 1 : "2" Expected results: Case 1 : Params : asd[] : [3] 0 : "" 1 : "1" 2 : "2"
Component: Untriaged → Developer Tools: Netmonitor
Status: UNCONFIRMED → NEW
Has STR: --- → yes
Ever confirmed: true
Product: Firefox → DevTools
This error only happens when the first occurrence of a repeated query parameter is blank. If the blank parameter appears after one with the same name with data, it will be included as a blank parameter in the parameter panel. This seems to happen because of how multiple parameters of the same name are handled in ParamsPanel.js' getProperties(): https://searchfox.org/mozilla-central/rev/5786b9be9f887ed371c804e786081b476a403104/devtools/client/netmonitor/src/components/ParamsPanel.js#82. The current code does not check if the first occurrence of a parameter was a blank string, and if it was, will not make the parameter's value into a list of values upon receiving a second value for the same parameter name. I can contribute a fix if Firefox is interested in resolving this issue.
Flags: needinfo?(odvarko)
Great, assigned to you :-) Honza
Assignee: nobody → tossj
Status: NEW → ASSIGNED
Flags: needinfo?(odvarko)
Attached patch 1362739.patch (obsolete) — Splinter Review
Attachment #9015500 - Flags: review?(odvarko)
Looks good to me, thanks for the patch! Let's see if the Try is green before R+ Honza
Attached patch 1362739.patchSplinter Review
Attachment #9015500 - Attachment is obsolete: true
Flags: needinfo?(tossj)
Attachment #9016345 - Flags: review?(odvarko)
Summary: Params showing wrong in HTTP insepector in specific case → Params showing wrong in HTTP inspector in specific case
Comment on attachment 9016345 [details] [diff] [review] 1362739.patch Review of attachment 9016345 [details] [diff] [review]: ----------------------------------------------------------------- Looks good to me, thanks for working on this! Honza
Attachment #9016345 - Flags: review?(odvarko) → review+
Pushed by ebalazs@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/9c535988954c Fix Params Panel to display empty values when multiple values exist for one parameter. r=Honza
Keywords: checkin-needed
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 64
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: