jetti777Ltd / mochiweb

Automatically exported from code.google.com/p/mochiweb
Other
0 stars 0 forks source link

parse_post() fails on valid content types #11

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Submit an AJAX post with this in the header, "Content-Type
application/x-www-form-urlencoded; charset=UTF-8" and this in the post body
"foo=bar".
2. While handling the request 'Req', call 'Req:parse_post()'.

What is the expected output? What do you see instead?

Expected: [{"foo", "bar"}]
Actual: []

What version of the product are you using? On what operating system?

Trunk as of 5/19/2008.

Please provide any additional information below.

There is a case statement in parse_post() that is a bit too restrictive.
Instead of doing a direct string comparison against
"application/x-www-form-urlencoded" you might want to do a substring search
or something more sophisticated that actually tokenizes the content-type
string.

Original issue reported on code.google.com by zaneshe...@gmail.com on 20 May 2008 at 12:10

GoogleCodeExporter commented 8 years ago
r72

Original comment by bob.ippo...@gmail.com on 20 May 2008 at 12:25