Proxyman
Proxyman copied to clipboard
[BUG] Scripting removes the = in the form body if the value is empty
Description
If the value of a pair key and value is an empty string (application/x-www-form-urlencoded), Proxyman Scripting removes the =, which is the incorrect format.
Steps to Reproduce
- Create a simple script for URL =
https://httpbin.proxyman.app/post?action=bug
async function onRequest(context, url, request) {
// console.log(request);
console.log(url);
// Update or Add new headers
request.headers["X-New-Headers"] = "My-Value";
// Done
return request;
}
- Make a request
curl 'https://httpbin.proxyman.app/post?action=bug' \
-X POST \
-H 'Host: httpbin.proxyman.app' \
-H 'Content-Type: application/x-www-form-urlencoded' \
--data-raw '__EVENTTARGET=&__EVENTARGUMENT=&__VIEWSTATE=123' \
--proxy localhost:9090
- Observe that the body of the request in the Main table view is modified incorrectly ❌
Current Behavior
- The body is: (Missing some
=)
__EVENTTARGET&__EVENTARGUMENT&__VIEWSTATE=123
Expected Behavior
- The body is intact
__EVENTTARGET=&__EVENTARGUMENT=&__VIEWSTATE=123
Fixed: https://download.proxyman.io/beta/Proxyman_4.16.0_Fix_scripting_with_form_body.dmg