Title: Skip setting 'Content-Type' on file upload, when multiple bodies are supported · Issue #947 · openapi-generators/openapi-python-client · GitHub
Open Graph Title: Skip setting 'Content-Type' on file upload, when multiple bodies are supported · Issue #947 · openapi-generators/openapi-python-client
X Title: Skip setting 'Content-Type' on file upload, when multiple bodies are supported · Issue #947 · openapi-generators/openapi-python-client
Description: Describe the bug Form-style submissions to endpoints that support multiple different content types are missing the necessary "boundary" attribute on the Content-Type header. POST https://.../items HTTP/1.1 Host: ... Accept: */* Accept-En...
Open Graph Description: Describe the bug Form-style submissions to endpoints that support multiple different content types are missing the necessary "boundary" attribute on the Content-Type header. POST https://.../items ...
X Description: Describe the bug Form-style submissions to endpoints that support multiple different content types are missing the necessary "boundary" attribute on the Content-Type header. POST https://...
Opengraph URL: https://github.com/openapi-generators/openapi-python-client/issues/947
X: @github
Domain: github.com
IPv4 address: 140.82.112.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Skip setting 'Content-Type' on file upload, when multiple bodies are supported","articleBody":"**Describe the bug**\r\nForm-style submissions to endpoints that support multiple different content types are missing the necessary \"boundary\" attribute on the Content-Type header.\r\n\r\n```\r\nPOST https://.../items HTTP/1.1\r\nHost: ...\r\nAccept: */*\r\nAccept-Encoding: gzip, deflate\r\nConnection: keep-alive\r\nUser-Agent: python-httpx/0.25.2\r\nAuthorization: Bearer ...\r\nContent-Type: multipart/form-data\r\nTransfer-Encoding: chunked\r\n```\r\n\r\n**Cause**\r\nhttps://github.com/openapi-generators/openapi-python-client/blob/660941dfe23a39ea9a22dd724e1db54afb130d08/openapi_python_client/templates/endpoint_module.py.jinja#L48-L63\r\n\r\nIn the template above, lines 60-62 have an \"if content-type is not multipart/form-data\" condition since httpx sets content type and multipart form boundary properly when files are provided. The same condition needs to be applied around line 54, which occurs when multiple body types are supported.","author":{"url":"https://github.com/kgutwin","@type":"Person","name":"kgutwin"},"datePublished":"2024-01-23T19:50:25Z","url":"https://github.com/openapi-generators/openapi-python-client/issues/947"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:8f17725c-bcc0-c237-d567-019680593340 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BCD2:161BA9:7EAC6E:A012A6:6B035A98 |
| html-safe-nonce | 201169ade1565ecdcfe3a68f862522343ae90d33f8891795b07a89453cc1bec1 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQ0QyOjE2MUJBOTo3RUFDNkU6QTAxMkE2OjZCMDM1QTk4IiwidmlzaXRvcl9pZCI6IjkxNTYyNTYxOTEwMzMzMzQ0MjUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | dabeae5f77d76bc3ddbb3c1aaf83f3cf3535fe87732ce126e4709dc8da98d004 |
| hovercard-subject-tag | issue:2096867510 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/openapi-generators/openapi-python-client/947/issue_layout |
| twitter:image | https://opengraph.githubassets.com/60b60883d2abf0020cd4360ea2c5026725b693fbccd01b1cc8dc5bdf749b5750/openapi-generators/openapi-python-client/issues/947 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/60b60883d2abf0020cd4360ea2c5026725b693fbccd01b1cc8dc5bdf749b5750/openapi-generators/openapi-python-client/issues/947 |
| og:image:alt | Describe the bug Form-style submissions to endpoints that support multiple different content types are missing the necessary "boundary" attribute on the Content-Type header. POST https://.../items ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | kgutwin |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| turbo-cache-control | no-preview |
| go-import | github.com/openapi-generators/openapi-python-client git https://github.com/openapi-generators/openapi-python-client.git |
| octolytics-dimension-user_id | 84925606 |
| octolytics-dimension-user_login | openapi-generators |
| octolytics-dimension-repository_id | 240776275 |
| octolytics-dimension-repository_nwo | openapi-generators/openapi-python-client |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 240776275 |
| octolytics-dimension-repository_network_root_nwo | openapi-generators/openapi-python-client |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width