Busboy is expecting the Content-Type header key to lower case
See original GitHub issueHi guys,
I’m running into troubles when using Busboy to parse a multipart/form-data from serverless on AWS lambda.
My event.headers
contains 'Content-Type': 'multipart/form-data; boundary=---------------------------30333176734664'
but the lib fails with Error: Missing Content-Type'
message.
It looks like the headers are not case sensitive (https://stackoverflow.com/a/5259004/534838).
Do you want me to push a PR that read the headers in a non-case sensitive way?
Best, Nicolas
Issue Analytics
- State:
- Created 4 years ago
- Comments:11 (3 by maintainers)
Top Results From Across the Web
Having problems with busboy and not finding Content-Type
Turns out, main.js in the busboy module checks for content-type instead of Content-Type , and thus does not find the header.
Read more >Content-Type - HTTP - MDN Web Docs - Mozilla
The Content-Type representation header is used to indicate the original media type of the ... Case insensitive, lowercase is preferred.
Read more >HTTP parse multipart/form-data - Cloud Functions
TODO(developer): process field values here _logger.LogInformation("Processed field '{key}' (value: '{value}')", parameter.Key, (string) parameter.Value);
Read more >HTTP client request headers (lowercase) issue - Google Groups
I see the value in changing incoming headers to lowercase, but it would be ... to set the headers to the exact format...
Read more >Deprecations - Axway Documentation Portal
To ensure that your application continues to operate as expected, ... support for overriding endpoint content-type using the flow's HTTP response headers.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi mscdex,
Thanks for the quick reply.
This change would allow the lib to be RFC compliant and work and work out of the box with serverless / aws lambda and not be dependant on some node behavior.
Best,
I am getting this issue today and I definitely see content-type all lowercase.