GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — fix: Let httpx2 choose the multipart/form-data boundary by RClaudiuM · Pull Request #1511 · openapi-generators/openapi-python-client Conversation
Contributor
Fixes #1509 Since #1005 every generated This stops setting Changes:
Testing:
I didn't run the
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactionsGenerated endpoints set Content-Type to multipart/form-data with the fixed boundary +++, so a file containing "\r\n--+++" was split at that point. Leave Content-Type unset for multipart bodies and let httpx2 add it with a random boundary, which also covers endpoints with several body types (openapi-generators#947). Fixes openapi-generators#1509
dbanty
approved these changes
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for the fix!
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactionsUh oh!
There was an error while loading. Please reload this page.
Merged
sda-mikerochefort
pushed a commit
to sda-mikerochefort/openapi-python-client
that referenced
this pull request
> [!IMPORTANT] > Merging this pull request will create this release ## ❗️Breaking ❗ ### Switch from `httpx` to `httpx2` in generated clients [`httpx2`](https://pydantic.dev/docs/httpx2/get-started/) is largely compatible with `httpx` and should only be a breaking change for users who customize the internal `Client`. Thanks to @s-sajid-ali and @johnthagen for making this one happen in PR openapi-generators#1461 and discussion openapi-generators#1455! ## 🚀 Features - Update `uv_build` to 0.13 when using `--meta=uv` (openapi-generators#1507) ## 🐛 Fixes - Let httpx2 choose the multipart/form-data boundary (openapi-generators#1511) ### Let httpx2 choose the boundary for `multipart/form-data` requests Since 0.29.0, generated endpoints sent every `multipart/form-data` body with the fixed boundary `+++`, so an uploaded file containing `\r\n--+++` was cut short at that point (openapi-generators#1509). These bodies no longer set `Content-Type`, so httpx2 sets it with a random boundary for each request, as single-body endpoints did before 0.29.0. Endpoints with several body types still get a boundary (openapi-generators#947). Co-authored-by: knope-bot[bot] <152252888+knope-bot[bot]@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ReviewersUh oh!
There was an error while loading. Please reload this page. AssigneesNo one assignedLabels
None yet
ProjectsMilestoneNo milestoneDevelopmentSuccessfully merging this pull request may close these issues. Fixed multipart boundary "+++" (since 0.29.0) truncates uploads whose content contains \r\n--+++Uh oh!
There was an error while loading. Please reload this page. Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later. |
| You are visitor 01402520 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |