[GH-ISSUE #1907] [BUG] Scripting removes the = in the form body if the value is empty #1900

Open
opened 2026-03-03 19:55:16 +03:00 by kerem · 1 comment
Owner

Originally created by @NghiaTranUIT on GitHub (Jan 14, 2024).
Original GitHub issue: https://github.com/ProxymanApp/Proxyman/issues/1907

Originally assigned to: @NghiaTranUIT on GitHub.

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

  1. 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;
}
  1. 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
  1. 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
Originally created by @NghiaTranUIT on GitHub (Jan 14, 2024). Original GitHub issue: https://github.com/ProxymanApp/Proxyman/issues/1907 Originally assigned to: @NghiaTranUIT on GitHub. ## 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 1. Create a simple script for URL = `https://httpbin.proxyman.app/post?action=bug` ```js 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; } ``` 2. Make a request ```sh 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 ``` 3. 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 ```
Author
Owner

@NghiaTranUIT commented on GitHub (Jan 14, 2024):

Fixed: https://download.proxyman.io/beta/Proxyman_4.16.0_Fix_scripting_with_form_body.dmg

<!-- gh-comment-id:1890829368 --> @NghiaTranUIT commented on GitHub (Jan 14, 2024): Fixed: https://download.proxyman.io/beta/Proxyman_4.16.0_Fix_scripting_with_form_body.dmg
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/Proxyman#1900
No description provided.