mirror of
https://github.com/ProxymanApp/Proxyman.git
synced 2026-04-28 09:35:55 +03:00
[GH-ISSUE #1513] zstd compression support #1505
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#1505
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 @aexvir on GitHub (Jan 25, 2023).
Original GitHub issue: https://github.com/ProxymanApp/Proxyman/issues/1513
Originally assigned to: @NghiaTranUIT on GitHub.
Description
we're using zstd compression between some of our services, and currently in proxyman I'm only able to visualize the binary data for the response body; other content encodings like gzip seem to be supported, so I'm guessing this is a feature request and not a bug
Why this feature/change is important?
currently I'm forced to always download the request body to disk and then use the
zstdcli to obtain plain text that I can use to debug what's going on, which slows me downthanks for developing this app! 🙂
@NghiaTranUIT commented on GitHub (Jan 25, 2023):
Thanks for opening the ticket.
Does the zstd is defined in the Header Content Encoding?
@aexvir commented on GitHub (Jan 25, 2023):
yep!
Content-Encoding: zstd@NghiaTranUIT commented on GitHub (Jan 26, 2023):
You can do a quick hack, by removing the Accept-Encoding in the Request -> Your server doesn't compress with the
zstd-> You can preview it on Proxyman -> Your client can get the uncompressed data since the Content-Encoding is omit.You can use the Scripting with On Request mode:
@aexvir commented on GitHub (Feb 1, 2023):
nice! I haven't used the scripting feature on proxyman yet, so I didn't think about this use case
I got it working, thanks for the suggestion, but if at some point zstd support could be added I think that would be nice 🙂
@rockmandash commented on GitHub (Jun 22, 2024):
I spent whole day finally found this!
This is pro tip!
It should be directly baked into example starter code!
@NghiaTranUIT commented on GitHub (Jun 23, 2024):
Glad it helps you @rockmandash 👍
@pavelhiq commented on GitHub (Oct 3, 2024):
Is there any update on this one?
While the tip is indeed helpful, it does introduce some (in my opinion) unnecessary difference in behaviour between the 'prod' app and the app under investigation. Might also be less convenient for projects and teams of larger scale.
@NghiaTranUIT commented on GitHub (Oct 4, 2024):
Let me try to add it, and send a Beta build to you 👍
@NghiaTranUIT commented on GitHub (Oct 4, 2024):
@pavelhiq @rockmandash @aexvir if you don't mind, let's try this Beta build: https://download.proxyman.io/beta/Proxyman_5.9.0_Support_zstd.dmg
Content-Encoding: zstdexist 👍@pavelhiq commented on GitHub (Oct 4, 2024):
@NghiaTranUIT that was soo quick, thank you!
I've now tried the beta you provided, however I could not get it working.
The response does contain the
content-encoding: zstd(lowercased!) header. But I still seePreview Not Support!in theBodytab. Lowercasing should be fine according to RFC 7540, section 8.1.2. Could that be the reason for not showing decoded content?I tried to verify that guess myself with the help of scripting, similar to what you provided above:
Had to remove
asyncfrom the template though. What I can see is:Bodytab now shows an array of bytesContent-Encodingheader is not showing any longer in theHeadertabIs that expected or am I doing smth wrong?
@NghiaTranUIT commented on GitHub (Oct 5, 2024):
Hm, it's odd, I tested with my local ExpressJS server, and it works fine with simple-zstd.
If you don't mind @pavelhiq , please share your sample request with nghia@proxyman.io (Right click on the request -> Export -> ProxymanLog). I'd like to investigate it 👍
@NghiaTranUIT commented on GitHub (Oct 5, 2024):
Second question:
Does your Response body compress by zstd (with
Content-Type: application/zstd), or a text-based (but use ztd compression when transferring the data (Content-Encoding)?)It's not matter, I handle both case
@pavelhiq commented on GitHub (Oct 7, 2024):
sorry, I dont have a suitable request that I could raw-export. but I do my best to provide details as much as possible)
to me this reflects how it works, yes. So first the body needs to be decompressed with zstd (because of the
content-encoding: zstdheader), then theContent-Type: application/jsonsteps in, the body to be interpreted as json.Btw, with no scripting, if I just export the binary response and then decompress with the cli tool - it works. Like this
@NghiaTranUIT commented on GitHub (Oct 8, 2024):
@pavelhiq I'm able to reproduce this issue. Tested with facebook.com, some requests are decompressed successfully (zst), and some won't. Not sure why it's.
I'm fixing and will send you new update 👍
@NghiaTranUIT commented on GitHub (Oct 8, 2024):
@pavelhiq it's fixed 👍
@pavelhiq commented on GitHub (Oct 8, 2024):
Yeah, streaming mode was something I could have mentioned earlier.. myself I had an issue with it too.
Now checked your latest beta update and it worked. Brilliant! 🎉
Should we expect this enhancement in 5.10, correct? Any estimate perhaps?
@NghiaTranUIT commented on GitHub (Oct 8, 2024):
yes, will release in 5.10.0, maybe next week 👍