-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Issue with lowercase content-disposition in multipart form #765
Comments
The Mulesoft backend I'm working with expects 'Content-Disposition' to extract the fields: |
Prefer uppercase, as some backends fail to auto-extract fields if the header is sent in lowercase. https://tools.ietf.org/id/draft-ietf-appsawg-multipart-form-data-04.html#rfc.section.5.2 Fixes cfug#765
Prefer 'Content-Disposition' over 'content-disposition' Prefer 'Content-Type' over 'content-type' Prefer 'Content-Transfer-Encoding' over 'content-transfer-encoding' Some backends fail to auto-extract fields if the field headers are sent in lowercase. https://tools.ietf.org/id/draft-ietf-appsawg-multipart-form-data-04.html#rfc.section.5.2 Fixes cfug#765
Possible duplicate of #641 |
1 similar comment
Possible duplicate of #641 |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If this is still an issue, please make sure it is up to date and if so, add a comment that this is still an issue to keep it open. Thank you for your contributions. |
Still an issue, please check the linked PR for a fix. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If this is still an issue, please make sure it is up to date and if so, add a comment that this is still an issue to keep it open. Thank you for your contributions. |
I got the same problem, is there a solution? |
I got the same problem, is there a solution? |
I got the same problem, is there a solution? |
Issue Info
Platform Name - flutter
Platform version - 1.12.13+hotfix.9
Dio Version - 3.0.9
Issue Description and Steps
I have a form multipart request that fails in the server with a 400 (Unable to get name from form-data). I've found the root cause:
The body contains the parts separated by 'boundaries':
Probably related to issue 641, the 'content-disposition' tags are sent in lowercase.
Inspecting this request with CharlesProxy and changing content-disposition to Content-Disposition results in the server returning a 200 as expected.
So the body should be:
The text was updated successfully, but these errors were encountered: