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

parse information from http post #5

Open
GoogleCodeExporter opened this issue Sep 19, 2015 · 3 comments
Open

parse information from http post #5

GoogleCodeExporter opened this issue Sep 19, 2015 · 3 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. write cgi with python and use neo_cgi.so
2. use firefox and request cgi with post method
3. check out the hdf

What is the expected output? What do you see instead?
we expected parsed information( key/value) from the post,but nothing  

What version of the product are you using? On what operating system?
clearsilver-0.10.5 linux  

Please provide any additional information below.

cgi/cgi.c  line: 643 

from :
    if (type && !strcmp(type, "application/x-www-form-urlencoded" )

change to :
    if (type && !strncmp(type, "application/x-www-form-urlencoded",33))


firefox send post like this :
    Content-Type: application/x-www-form-urlencoded; charset=UTF-8


Original issue reported on code.google.com by [email protected] on 12 Oct 2011 at 12:11

@GoogleCodeExporter
Copy link
Author

But chrome is ok

HTTP_USER_AGENT=Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.1 (KHTML, like 
Gecko) Chrome/21.0.1180.89 Safari/537.1
CONTENT_TYPE=application/x-www-form-urlencoded

I can get HTTP Form POST via Query.XXX

https://github.com/xiangzhai/xcloud/blob/master/test/hellofcgi.cpp

Original comment by [email protected] on 29 Sep 2012 at 2:16

@GoogleCodeExporter
Copy link
Author

sorry about the late reply.

chrome may ok because "Content-Type: application/x-www-form-urlencoded",
but firefox is "Content-Type: application/x-www-form-urlencoded;
charset=UTF-8".

fix the cgi.c and it will works well for both

Original comment by [email protected] on 18 Oct 2012 at 2:19

@GoogleCodeExporter
Copy link
Author

HTTP POST testcase 
https://github.com/xiangzhai/xcloud/blob/master/test/hellofcgi.cpp

and I emerge www-client/firefox-15.0.1 under Gentoo Linux, as the attachment 
shown: CONTENT_TYPE=application/x-www-form-urlencoded, but without 
"charset=UTF-8"

Original comment by [email protected] on 20 Oct 2012 at 3:05

Attachments:

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

No branches or pull requests

1 participant