Closed
Bug 1420982
Opened 8 years ago
Closed 8 years ago
Copy as cURL ignore PATCH data
Categories
(DevTools :: Netmonitor, defect, P3)
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.
Updated•8 years ago
|
Component: Untriaged → Developer Tools: Netmonitor
Comment 1•8 years ago
|
||
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
| Comment hidden (mozreview-request) |
| Assignee | ||
Comment 3•8 years ago
|
||
Hi Honza,
I have created a quick patch, does this fix the issue?
Comment 4•8 years ago
|
||
(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 5•8 years ago
|
||
| mozreview-review | ||
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-
| Comment hidden (mozreview-request) |
| Assignee | ||
Comment 7•8 years ago
|
||
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)
Comment 8•8 years ago
|
||
(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 9•8 years ago
|
||
| mozreview-review | ||
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+
| Comment hidden (mozreview-request) |
| Assignee | ||
Comment 11•8 years ago
|
||
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
| Assignee | ||
Comment 12•8 years ago
|
||
Pushed to TRY again and TRY is green.
https://treeherder.mozilla.org/#/jobs?repo=try&revision=4555eab25b2fe9f27939543be369f8bb222b3483
| Assignee | ||
Updated•8 years ago
|
Keywords: checkin-needed
Comment 13•8 years ago
|
||
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
Comment 14•8 years ago
|
||
| bugherder | ||
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
status-firefox59:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 59
Updated•7 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•