lwcolton / falcon-cors

CORS support for Falcon: http://falconframework.org
Apache License 2.0
74 stars 15 forks source link

avoid checking empty string headers #4

Closed dropwhile closed 7 years ago

dropwhile commented 7 years ago

Chrome apparently sends empty Access-Control-Request-Headers sometimes Chrome bug: https://bugs.chromium.org/p/chromium/issues/detail?id=633729

This results in checking the empty string against a list of allowed headers, which doesn't make much sense. Filtering the requested_headers list to remove empty strings should solve this.

lwcolton commented 7 years ago

Hi, thanks for the contribution! I implemented this in master by iterating over each header instead of using filter, to break up the logic so it's easier to read. Also I got travis ci running so you can test PR's . Cheers!

dropwhile commented 7 years ago

great! Would it be possible to release this as an update to pypi?

lwcolton commented 7 years ago

Yes today I will push a release

On Nov 9, 2016 3:06 PM, "eli" notifications@github.com wrote:

great! Would it be possible to release this as an update to pypi?

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/lwcolton/falcon-cors/pull/4#issuecomment-259526627, or mute the thread https://github.com/notifications/unsubscribe-auth/ABWuLkG9gVvVVqOuyDtWdf1_kur4N1Pyks5q8jXQgaJpZM4KtB-h .

lwcolton commented 7 years ago

@cactus hey sorry I just got releases setup in travis, pushed 1.1.2 to pypi tonight!

dropwhile commented 7 years ago

@lwcolton no worries. thanks for the update!