Fix parsing urlencoded pairs with empty values. - #6980
Conversation
|
|
c67559f to
a28d283
Compare
|
Hi @adamroyle thanks for submitting this! We're eager to help you get this into a merged state. While I was testing this PR out locally I've found some cases where we will still not properly render urlencoded pairs. Can you provide an example you used for testing this PR? |
|
I'm just using a simple example: As an aside, however, I found another issue where Bash-style ANSI-C quoted strings (eg. --data-raw $'....') were not decoded properly. Google Chrome's "Copy as cURL" feature uses them for JSON strings that contain special chars. eg. I spent a while trying to get it to work but ran into too many issues (mainly with general shell parsing libraries not implementing Bash-style quotes), and instead built a parser for "Copy as fetch (Node.js)" instead which has been much more reliable. |
a28d283 to
1bdf78f
Compare
There is a bug with parsing curl statements with empty values. This fixes the bug and adjusts the tests to expected behavior.