-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
fix(remix-server-runtime): multi-part form data's boundary can be wrapped in quotes ("
)
#7237
base: dev
Are you sure you want to change the base?
Conversation
|
Hi @omelhus, Welcome, and thank you for contributing to Remix! Before we consider your pull request, we ask that you sign our Contributor License Agreement (CLA). We require this only once. You may review the CLA and sign it by adding your name to contributors.yml. Once the CLA is signed, the If you have already signed the CLA and received this response in error, or if you have any questions, please contact us at [email protected]. Thanks! - The Remix team |
Thank you for signing the Contributor License Agreement. Let's get this merged! 🥳 |
I guess you can just cherry pick the three lines to fix this :) |
"
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@omelhus Are you still interested in getting this PR merged?
If so, could you please rebase onto latest dev
and solve conflicts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since you created an actual file, can you please keep the original integration/bug-report-test.ts
file?
"app/routes/burgers.jsx": js` | ||
export default function Index() { | ||
return <div>cheeseburger</div>; | ||
"app/routes/upload.jsx": js` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"app/routes/upload.jsx": js` | |
"app/routes/upload.tsx": js` |
export default function Index() { | ||
return <div>cheeseburger</div>; | ||
"app/routes/upload.jsx": js` | ||
import { json, ActionArgs, unstable_parseMultipartFormData } from '@remix-run/node'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
import { json, ActionArgs, unstable_parseMultipartFormData } from '@remix-run/node'; | |
import { json, unstable_parseMultipartFormData } from '@remix-run/node'; |
const rsp = await unstable_parseMultipartFormData(request, async ({ data, filename, contentType }) => { | ||
return filename; | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const rsp = await unstable_parseMultipartFormData(request, async ({ data, filename, contentType }) => { | |
return filename; | |
}); | |
const rsp = await unstable_parseMultipartFormData(request, ({ filename }) => filename); |
When a multipart/form-data upload is done from .NET it wraps the value of the boundary property in the content-type header with ", like
"multipart/form-data; boundary=\"--------------------------890934293568639326555573\""
, and this breaks the upload in unstable_parseMultipartFormData.Closes: Did not bother with creating an issue. Fix included in PR.
Testing Strategy: