[hunchentoot-devel] Why can't the python script get the post parameters from hunchentoot-cgi?
z_axis
z_axis at 163.com
Tue Jan 10 23:53:35 UTC 2012
I have used `python -m CGIHTTPServer` to test the posted parameter:
{'SERVER_PROTOCOL': 'HTTP/1.0', 'SERVER_SOFTWARE': 'SimpleHTTP/0.6
Python/2.7.2', 'SCRIPT_NAME': '/cgi-bin/nav.py',
'QUERY_STRING': '', 'SERVER_NAME': 'myarch', 'REMOTE_ADDR': '127.0.0.1',
'CONTENT_LENGTH': '33','HTTP_REFERER': 'http://127.0.0.1:8000/',
'SERVER_PORT': '8000',
'CONTENT_TYPE': 'application/x-www-form-urlencoded',
'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; Linux i686; rv:9.0.1) Gecko/20100101
Firefox/9.0.1', '_': '/usr/bin/python',
'HTTP_ACCEPT': '
text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\n','GATEWAY_INTERFACE':
'CGI/1.1',
'REQUEST_METHOD': 'POST', 'REMOTE_HOST': 'localhost.localdomain',
'HTTP_COOKIE': '', 'PATH_INFO': ''}
Both content_length and content_length are different from hunchentoot.
在 Tue, 10 Jan 2012 18:21:16 +0800,Sebastian Tennant
<sebyte at smolny.plus.com> 写道:
> Quoth z_axis <z_axis at 163.com>:
>> #'create-prefix-dispatcher [...] does not prepare both Content-Type and
>> Content-Length [headers].
>
> I don't use #'create-prefix-dispatcher (so I can't quickly test your
> assertion
> directly) but I can confirm that #'create-regex-dispatcher (which I use
> all the
> time) prepares a Content-Type header but doesn't prepare a Content-Length
> header.
>
> Assuming #'create-prefix-dispatcher behaves in the same way, then your
> assertion is correct.
>
> Hans, my understanding of the nuts and bolts of HTTP is pretty limited.
> What
> are the benefits of sending a Content-Length header? Is this something
> Hunchentoot should perhaps do?
>
> Seb
>
>
> _______________________________________________
> tbnl-devel site list
> tbnl-devel at common-lisp.net
> http://common-lisp.net/mailman/listinfo/tbnl-devel
--
使用 Opera 革命性的电子邮件客户程序: http://www.opera.com/mail/
More information about the Tbnl-devel
mailing list