Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Binary Files are not correctly unpacked #90

Open
sirwolfgang opened this issue Jul 10, 2024 · 3 comments
Open

Binary Files are not correctly unpacked #90

sirwolfgang opened this issue Jul 10, 2024 · 3 comments

Comments

@sirwolfgang
Copy link

I found this working with statements API, but it does effect all file endpoints and as part of the upstream OpenAPI Generator code, effect all file transfers. The header "content-transfer-encoding"=>"binary" is never acknowledged making the files functionally corrupt.

The monkey patch to verify this looks something like this

# Old
@stream.join.force_encoding(encoding)

# Fixed
@stream.join.unpack('m').join.force_encoding(encoding)
@sirwolfgang
Copy link
Author

I've opened a PR for the patch here: OpenAPITools/openapi-generator#19132

@sirwolfgang
Copy link
Author

Patch has been merged it, will be available as part of 7.8.0

@mogman1
Copy link
Collaborator

mogman1 commented Jul 17, 2024

Thank you for the report and going the extra mile to submit a patch to the openapi tools generator. We'll keep an eye out for their next release, but we probably won't be able to pick this up for another week or two (and hopefully by then they'll have pushed out that minor version update).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants