Hello,

My application function starts like this:

@Request.application
def application(request):
    print request.args
    print request.headers
    print request.path

and the problem is that, even though all other fields contain the
right values, request.args is empty, when it should contain form
fields from the POST method. Specifically, the result of the above
print statements is:

----
ImmutableMultiDict([])
Referer: http://localhost:4000/signup
Content-Length: 1053
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.9)
Gecko/20100910 Firefox/3.6.9
Connection: keep-alive
Host: localhost:4000
Cache-Control: max-age=0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/
*;q=0.8
Accept-Language: en-us,en;q=0.5
Content-Type: application/x-www-form-urlencoded
Accept-Encoding: gzip,deflate
Keep-Alive: 115


/signup
----

I've checked and the request as transferred by the browser over the
TCP socket contains the form fields in the usual HTTP way, consistent
with the above "Content-type" and "Content-length" headers.

This application is run with run_simple(), and the environ looks like
this:

{'wsgi.multiprocess': False, 'HTTP_REFERER': 'http://localhost:4000/
signup', 'werkzeug.session': <Session {}>, 'SERVER_SOFTWARE':
'Werkzeug/unknown', 'SCRIPT_NAME': '', 'REQUEST_METHOD': 'POST',
'PATH_INFO': '/signup', 'SERVER_PROTOCOL': 'HTTP/1.1', 'QUERY_STRING':
'', 'CONTENT_LENGTH': '1053', 'HTTP_ACCEPT_CHARSET':
'ISO-8859-1,utf-8;q=0.7,*;q=0.7', 'HTTP_USER_AGENT': 'Mozilla/5.0
(X11; U; FreeBSD amd64; en-US; rv:1.9.2.9) Gecko/20100910 Firefox/
3.6.9', 'HTTP_CONNECTION': 'keep-alive', 'SERVER_NAME': '0.0.0.0',
'REMOTE_PORT': 22854, 'wsgi.url_scheme': 'http', 'SERVER_PORT':
'4000', 'werkzeug.request': <Request 'http://localhost:4000/
signup' [POST]>, 'wsgi.input': <socket._fileobject object at
0x802dd6650>, 'HTTP_HOST': 'localhost:4000', 'wsgi.multithread':
False, 'HTTP_CACHE_CONTROL': 'max-age=0', 'HTTP_ACCEPT': 'text/
html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
'wsgi.version': (1, 0), 'wsgi.run_once': False, 'wsgi.errors': <open
file '<stderr>', mode 'w' at 0x800e331e0>, 'REMOTE_ADDR': '127.0.0.1',
'HTTP_ACCEPT_LANGUAGE': 'en-us,en;q=0.5', 'CONTENT_TYPE': 'application/
x-www-form-urlencoded', 'HTTP_ACCEPT_ENCODING': 'gzip,deflate',
'HTTP_KEEP_ALIVE': '115'}

This is Werkzeug-0.6.2.

Any ideas what is wrong here?

-- 
You received this message because you are subscribed to the Google Groups 
"pocoo-libs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/pocoo-libs?hl=en.

Reply via email to