question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Busboy is expecting the Content-Type header key to lower case

See original GitHub issue

Hi 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:closed
  • Created 4 years ago
  • Comments:11 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
ngirardincommented, Jul 17, 2019

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,

1reaction
cport1commented, Jan 12, 2021

I am getting this issue today and I definitely see content-type all lowercase.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found