Fix parsing of 'Access-Control-Request-Headers' header#422
Fix parsing of 'Access-Control-Request-Headers' header#422leplatrem merged 1 commit intoCornices:masterfrom spoof:master
Conversation
|
Thanks for fixing this!
If you can, it would be excellent! Especially to make the spec explicit with a simple test (e.g. reproduce with the example you gave in the description). Some parts of Cornice are not tested with a lot of precision indeed, but let's improve! Also, could you add a line in the CHANGELOG and add yourself to the contributors please? |
|
I've updated my PR: added line to CHANGES.txt and CONTRIBUTORS.txt |
Cornice parses this header using non flexible way as HTTP specification required. Specifications says Access-Control-Request-Headers header can have any number of LWS (Linear White Spaces) between commas.
Cornice parses this header by using the non flexible way as HTTP specification
required. Specifications says Access-Control-Request-Headers header
can have any number of LWS (Linear White Spaces) between commas.
But Cornice strictly waits for 'comma with space' delimiter.
It leads to an error for header values like
Access-Control-Request-Headers: header1,header2,header3whencors_expose_all_headers=True, even if any of these headers (or all of them)persist in
service.cors_headersattribute.Is it necessary to write tests for this situation? (I see no such tests for other headers)