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

POST parameters are not parsed. #103

Open
RauliL opened this issue Dec 7, 2014 · 2 comments
Open

POST parameters are not parsed. #103

RauliL opened this issue Dec 7, 2014 · 2 comments
Assignees
Labels

Comments

@RauliL
Copy link
Member

RauliL commented Dec 7, 2014

POST parameters are currently ignored because of incorrect MIME type handling. POST parameters are only parsed in situations where Content-Type header sent by the client equals application/x-www-form-urlencoded. (Which is practically never since that is incorrect behavior from browser as it's missing the charset parameter.)

Possible solutions:

  • Make Request class in sapi/request.cc to check whether Content-Type header starts with application/x-www-form-urlencoded. (Bad)
  • Implement some kind of MIME type parser which separates the actual MIME type from character encoding. (Good)

Side note: One major issue is also that we currently support only UTF-8 character encoding. While all browsers should send their data encoded with UTF-8, some older browsers might send it in ISO-8859-1 or whatever if character encoding is not correctly specified in <form> tag or Content-Type header sent by the server. We actually might need to implement support for other character encodings which is going to be painful.

@RauliL RauliL added the bug label Dec 7, 2014
@RauliL RauliL self-assigned this Dec 7, 2014
@jupelius
Copy link
Contributor

#109 partially solved this.

@RauliL
Copy link
Member Author

RauliL commented May 14, 2015

It's just a bad temporary workaround thought, and does not properly solve the problem. I am not yet satisfied.

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

No branches or pull requests

2 participants