Closed Bug 1420982 Opened 8 years ago Closed 8 years ago

Copy as cURL ignore PATCH data

Categories

(DevTools :: Netmonitor, defect, P3)

57 Branch
defect

Tracking

(firefox59 fixed)

RESOLVED FIXED
Firefox 59
Tracking Status
firefox59 --- fixed

People

(Reporter: erdnaxeli, Assigned: abhinav.koppula, Mentored)

Details

(Keywords: good-first-bug)

Attachments

(1 file)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:57.0) Gecko/20100101 Firefox/57.0 Build ID: 20171115095343 Steps to reproduce: * go on a website doing a PATCH request * open the Developer Tools, tab Network * triggers the PATCH request * right click on the line corresponding to the request, copy > copy as cURL Actual results: I got the curl line with the data. Expected results: I should have the curl line with the data. The data is available if I use copy > copy POST Data.
Component: Untriaged → Developer Tools: Netmonitor
Thanks for the report! For anyone interested, the fix could be around these lines: https://github.com/mozilla/gecko-dev/blob/master/devtools/client/shared/curl.js#L77 (see that PATCH doesn't seem to be supported) Honza
Mentor: odvarko
Keywords: good-first-bug
Priority: -- → P3
Hi Honza, I have created a quick patch, does this fix the issue?
(In reply to Abhinav Koppula from comment #3) > Hi Honza, > I have created a quick patch, does this fix the issue? Yes, I am seeing the posted data now. This also needs a test. I think you might extend the existing one: browser_net_curl-utils.js Honza
Assignee: nobody → abhinav.koppula
Status: UNCONFIRMED → ASSIGNED
Has STR: --- → yes
Ever confirmed: true
Comment on attachment 8938462 [details] Bug 1420982 - Fix for copy as cURL ignoring PATCH data. https://reviewboard.mozilla.org/r/209168/#review215812 Thanks Abhinav! Only needs a test. Honza
Attachment #8938462 - Flags: review?(odvarko) → review-
Hi Honza, I have updated my patch with the test. But eslint is giving an error saying that i have too many nested callbacks. mozilla-central/devtools/client/netmonitor/test/html_curl-utils.html 105:34 error Too many nested callbacks (4). Maximum allowed is 3. max-nested-callbacks (eslint) ajaxGet(url, () => { ajaxPost(url, () => { ajaxPatch(url, () => { ajaxMultipart(url, () => { submitForm(); }); }); }); }); So i'm guessing that we are nesting since we want the xhrs to be fired in a specific order. Should we somehow ignore this eslint rule for this test?
Flags: needinfo?(odvarko)
(In reply to Abhinav Koppula from comment #7) > Should we somehow ignore this eslint rule for this test? Yes, you can disable it by putting: /* eslint-disable max-nested-callbacks */ ...at the top of the script (just underneath of: /* exported performRequests */ Honza
Flags: needinfo?(odvarko)
Comment on attachment 8938462 [details] Bug 1420982 - Fix for copy as cURL ignoring PATCH data. https://reviewboard.mozilla.org/r/209168/#review216142 Excellent, looks good to me! R+ Thanks Abhinav, Honza
Attachment #8938462 - Flags: review?(odvarko) → review+
Hi Honza, Thanks for the review. I have fixed the eslint issue as well and have pushed to TRY https://treeherder.mozilla.org/#/jobs?repo=try&revision=9fea42cb9d7505d8819056e1da7887c102ee0c29
Keywords: checkin-needed
Pushed by archaeopteryx@coole-files.de: https://hg.mozilla.org/integration/autoland/rev/d6993ed46421 Fix for copy as cURL ignoring PATCH data. r=Honza
Keywords: checkin-needed
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 59
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: