[Triage] dirty protocol fails with binary data #3486
Replies: 4 comments 2 replies
-
|
Yes this is expected. Look at the example it is encoding the binary as base64 to ensure it pass. It's a limitation in using json: https://gunicorn.org//dirty/#best-practices_1 It's possible to replace change the protocol to not use json, but this would makes it slightly more complicated. Thoughts? |
Beta Was this translation helpful? Give feedback.
-
|
I think for stream responsens using bytes would be better ootb, you don't need to encode/decode between streaming to clients, and communication between main process and dirty workers. ideally the protocol could be pluggable, i'd also use msgpack for this to keep all things binary |
Beta Was this translation helpful? Give feedback.
-
|
Can you test #3500 which implements it ? Let me know. |
Beta Was this translation helpful? Give feedback.
-
|
merged in main :) |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Type
Bug Report
Description
Steps to Reproduce (for bugs)
send bytes to dirty app
document indicate it supports https://gunicorn.org/dirty/#example-image-processing
but looks like it does a
json.dumpsbefore, which makes it failConfiguration
No response
Logs / Error Output
No response
Gunicorn Version
25.0.1
Python Version
3.13
Worker Class
custom
Operating System
linux
Additional Context
No response
Checklist
Beta Was this translation helpful? Give feedback.
All reactions