Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Encoding errors while parsing www-form-urlencoded post requests are fatal #117

Open
rongarret opened this issue Jul 11, 2016 · 0 comments
Open

Comments

@rongarret
Copy link

The HTTP standard has no way for a client to specify a character encoding for www-form-urlencoded POST data. So you have to guess. And if you guess utf-8 and you end up being wrong and generating a UTF-8 parse error, then there is no way to recover because maybe-read-post-parameters is hard-coded to call abort-request-handler if the parse fails.

There's a hacky workaround for this by always parsing first to latin-1 (which can't fail) and then converting to UTF-8 afterwards, but it seems like there really ought to be a better way to handle this.

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

No branches or pull requests

1 participant