ProxymanApp / ProxymanApp/Proxyman
[BUG] Scripting removes the = in the form body if the value is empty
Open
@NghiaTranUIT is already working on this.
Since Jan 14, 2024.
✅ Done
bug
- Dominant language
- No language data
- Stars
- 7k
- Forks
- 237
- PR merge metrics
- No merged PRs in 30d
Description
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
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.