Skip to content
This repository has been archived by the owner on Nov 6, 2022. It is now read-only.

Invalid header chars fix #282

Closed
wants to merge 1 commit into from
Closed

Invalid header chars fix #282

wants to merge 1 commit into from

Conversation

silentroach
Copy link

I'm not a C programmer, sorry for that.

Real use case: nginx + maxmind geobase + user from Düsseldorf will generate something like this

curl -vvv http://localhost:8000 -H 'GEOIP_CITY: Düsseldorf'

This request will cause empty response (with HPE_INVALID_HEADER_TOKEN) from nodejs because of ü. And seems like it is valid character for headers (%x80-FF) but in IS_HEADER_CHAR we get a negative char value (cause of signed char is -127..127), so I just casted ch to unsigned char before check.

Bad things happened with nodejs v5.6.0 in this commit nodejs/node@98fde2f.

@silentroach
Copy link
Author

thank you

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant