ProxymanApp / ProxymanApp/Proxyman

[BUG] Scripting removes the = in the form body if the value is empty

Open
#1,907 1 comment 0 reactions 1 assignee View on GitHub

@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

  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

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.