department-of-veterans-affairs / vets-api

API powering VA.gov
https://api.va.gov
Other
202 stars 61 forks source link

Header names should be case-insensitve #4482

Open ilopmar opened 4 years ago

ilopmar commented 4 years ago

According to RFC 2616 - Hypertext Transfer Protocol -- HTTP/1.1, Section 4.2, "Message Headers"

Each header field consists of a name followed by a colon (":") and the field value. Field names are case-insensitive

But the implementation when uploading files as multipart/form checks that the headers are capitalized: https://github.com/department-of-veterans-affairs/vets-api/blob/master/modules/vba_documents/lib/vba_documents/multipart_parser.rb#L64

Leading to an upload failure. That code (and any other code that check for header names) should be updated with a case-insensitive check of the headers.

annaswims commented 4 years ago

@charleystran Did you see this one?