Copy as cURL on post requests does not build post data correctly
Reported by
g...@scopey.co.nz,
Oct 25 2016
|
||||||
Issue descriptionUserAgent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.71 Safari/537.36 Steps to reproduce the problem: 1. Create a POST request with more than one POST value 2. After posting, copy as curl (not "all") Test script (I used jsbin): <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width"> <title>JS Bin</title> </head> <body> <form method="POST" action="/?three=bin&four=baz"> <input name="one" value="foo"> <input name="two" value="bar"> <input type="submit"> </form> </body> </html> What is the expected behavior? Valid cURL data is copied, no additional characters. What went wrong? In the serailised post data and the GET query string a carat (^) appears after every value. Did this work before? Yes 53.0.2785.143 Chrome version: 54.0.2840.71 Channel: stable OS Version: 10.0 Flash Version: Shockwave Flash 23.0 r0
,
Oct 25 2016
Broken by https://crrev.com/2182213006
,
Oct 25 2016
As per comment #2 this bug seems to be caused of BUG= 505391 . Hence, assigning to developer for further action.
,
Oct 25 2016
This isn't a bug... It looks like you are using Windows but pasting into a linux terminal? This is because we are sniffing out the OS of the host machine and using it to decide which type of bash to escape the characters with. Maybe adding a checkbox in the setting to allow you to force an it to copy in windows or linux style would be better?
,
Oct 25 2016
#4 is wrong. This IS a bug that can be EASILY checked in a couple of seconds. Run the following in a standard command prompt: echo "a=1^&b=2" and you'll see that everything inside doublequotes is preserved, which is exactly the purpose of doublequotes. ESCAPING VIA ^ IS NOT NEEDED INSIDE DOUBLEQUOTES ON WINDOWS.
,
Oct 25 2016
I see, url fragments are being escaped with double quotes as well.
,
Oct 26 2016
WRT comment #4, if there ever is a point where you sniff the OS to check what format to provide then I think a checkbox to control that behaviour is definitely required. Remember that Windows actually ships with an inbuilt Ubuntu VM (beta) since the anniversary edition.
,
Dec 1 2016
,
Dec 1 2017
,
Dec 14 2017
,
Oct 12
|
||||||
►
Sign in to add a comment |
||||||
Comment 1 by woxxom@gmail.com
, Oct 25 2016