Skip to content

fix gateway headers / headers casing#88

Merged
denismakogon merged 1 commit intomasterfrom
fix-gw-headers
Jun 21, 2019
Merged

fix gateway headers / headers casing#88
denismakogon merged 1 commit intomasterfrom
fix-gw-headers

Conversation

@rdallman
Copy link
Copy Markdown
Contributor

@rdallman rdallman commented Jun 21, 2019

the http library we're using automatically lower cases headers, and we weren't
properly handling different cases when encapsulating certain headers such as
content type and the gateway headers. this changes most of the headers to be
turned into lower case to check them and lower cases them going out of the
response in order to test them as well. over the wire itself, fn via the go
http library will end up turning these into the canonical header casing, but
for consistency in python this seems ideal. there are tests to ensure these
are checked properly in various cases now.

closes #87

the http library we're using automatically lower cases headers, and we weren't
properly handling different cases when encapsulating certain headers such as
content type and the gateway headers. this changes most of the headers to be
turned into lower case to check them and lower cases them going out of the
response in order to test them as well. over the wire itself, fn via the go
http library will end up turning these into the canonical header casing, but
for consistency in python this seems ideal. there are tests to ensure these
are checked properly in various cases now.

closes #87
@rdallman rdallman requested a review from denismakogon June 21, 2019 19:09
@denismakogon denismakogon merged commit 48970f1 into master Jun 21, 2019
@denismakogon denismakogon deleted the fix-gw-headers branch June 21, 2019 21:09
@rdallman
Copy link
Copy Markdown
Contributor Author

thanks!

@ljmc2000
Copy link
Copy Markdown

the Content-Type: None additional header is back, though at least now it's consistant, so there's that.

@rdallman
Copy link
Copy Markdown
Contributor Author

yep, think I found it. from what I can tell this is all a mess from us stripping out the case insensitive headers dictionary that sanic was using when we vendored it (probably, to make things fast). can monkey patch but we should probably figure out something more sane and maintainable cc @denismakogon

@rdallman
Copy link
Copy Markdown
Contributor Author

@fmtovland this seems to do the trick: #90

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Headers not being sent

3 participants