-
-
Notifications
You must be signed in to change notification settings - Fork 366
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
Delete Content-Type
header for multipart requests
#211
Delete Content-Type
header for multipart requests
#211
Conversation
3ea45cc
to
1de8453
Compare
// @rangermeier |
Content-Type
header for multipart requests
Not sure if it's a good idea to always remove I think it would be safer to move the new code into its preceding
|
Agreed. At the end of the day, this is a hack, and thus the scope of its impact should be reduced as much as possible so it only takes effect when really necessary. I also think it's worth leaving a code comment here describing why it's being done, perhaps with a link to the original problem. |
@gydroperit Ping :) |
420e700
to
f098c33
Compare
Tests are failing |
3092555
to
671a521
Compare
Added test cases for request with FormData and searchParams and custom content-type header. Line 207 in 041e935
browser › FormData with searchParams ("multipart/form-data" parser)
node_modules/puppeteer/lib/Connection.js:74
Rejected promise returned by test. Reason:
Error {
message: 'Protocol error (Target.closeTarget): Target closed.',
}
node_modules/puppeteer/lib/Connection.js:74:56
Connection.send (node_modules/puppeteer/lib/Connection.js:73:12)
Page.close (node_modules/puppeteer/lib/Page.js:1040:38)
Page.<anonymous> (node_modules/puppeteer/lib/helper.js:112:23)
withPage `(test/helpers/with-page.js:9:14)` Can we just delete it? |
Try to do some debugging. You could start by Googling the error. |
671a521
to
de75793
Compare
Did it |
…ody type is FormData or UrlSearchParams
de75793
to
edd9a51
Compare
Ping |
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.
LGTM
We need to delete Content-Type header every time we create new instance of Request to properly set boundary in headers and in body.
Fixes #209