mirror of
https://github.com/ProxymanApp/Proxyman.git
synced 2026-04-27 00:55:57 +03:00
[GH-ISSUE #759] script onResponse with base64 response data from server return not correct #753
Labels
No labels
Discussion
Feature request
In Progress...
Plugins
Waiting response
Windows
Windows
bug
duplicate
enhancement
feature
good first issue
iOS
macOS 10.11
question
wontfix
✅ Done
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/Proxyman#753
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ixqbar on GitHub (Jan 14, 2021).
Original GitHub issue: https://github.com/ProxymanApp/Proxyman/issues/759
Originally assigned to: @NghiaTranUIT on GitHub.
Proxyman version? (Ex. Proxyman 1.4.3)
2.16.0
macOS Version? (Ex. mac 10.14)
11.0.1
Steps to reproduce
Expected behavior
Screenshots (optional)
@NghiaTranUIT commented on GitHub (Jan 14, 2021):
Hi @jonnywang, if you disable a rule, what the value of
console.log(res.data)andconsole.log(res.data.length)from your code?Is it the same value (108)? 🤔
@NghiaTranUIT commented on GitHub (Jan 14, 2021):
From the second screenshot, the value of
console.log(res.data)is a binary (You can see the invalid characters).The reason why you see the Base64 string in
console.log(response.body)is because we convert the binary value to Base64 string since there is no way to pass Binary Data from Swift to the JavascriptCore. Therefore, the string might take 152 in lengths rather than 108 from the binary format.Proxyman also converts the base64 string in the response.body to the binary format too.
So it's correct behavior 🤔
Not sure what this behavior causes to you @jonnywang ?
@ixqbar commented on GitHub (Jan 14, 2021):
152 is right, server response data is base64 encode data, but after using proxy the client got not collect response data length
@NghiaTranUIT commented on GitHub (Jan 14, 2021):
@jonnywang if you don't mind, please help me log two following scenario:
It's easier for me to fix it 😄
@ixqbar commented on GitHub (Jan 14, 2021):
after disable rule, client logs
@NghiaTranUIT commented on GitHub (Jan 14, 2021):
Thanks. Let me try to reproduce this bug on my end 👍
@ixqbar commented on GitHub (Jan 14, 2021):
👍
@NghiaTranUIT commented on GitHub (Jan 14, 2021):
Hey @jonnywang Let check out this beta build: https://proxyman.s3.us-east-2.amazonaws.com/beta/Proxyman_2.16.0_Fix_Base64.dmg
and please let me know if it works for you 🙌
@ixqbar commented on GitHub (Jan 14, 2021):
test ok,fixed!
👍
@NghiaTranUIT commented on GitHub (Jan 14, 2021):
💯