are you still experiencing the issue in 2.8.2 ?

On Wednesday, December 11, 2013 3:00:27 AM UTC+1, Vincent Audebert wrote:
>
> Trying to catch up on this issue. Has it been fixed on trunk? Also when is 
> forecasted the next released?
>
> At the moment, I just hacked main.py by replacing http_content_type with 
> content_type. Does it sound ok ?
>
> Cheers.
> Vincent.
>
> On Thursday, August 1, 2013 6:53:09 PM UTC+12, Ray (a.k.a. Iceberg) wrote:
>>
>> To whom it may concern:
>>
>> I tried posting vars in json format, with content-type: application/json 
>> header, to my web2py application.
>>
>> When the above test is run on my laptop, i.e. requests are sent directly 
>> to web2py's rocket web server, recent web2py (the 2.5.1-stable) can 
>> successfully decode the payload into request.vars, as expected as mentioned 
>> in https://groups.google.com/d/msg/web2py/9YdxVpuJlA8/ek0zJae5U9YJ
>>
>> But when I deploy my application to my production server, the same web2py 
>> 2.5.1-stable can not recognize the payload and the request.vars are always 
>> empty. How come?
>>
>> My production server is running a web2py (was 2.4.6, and then manually 
>> overwritten by those files in 2.5.1's web2py_src.zip), behind apache's 
>> mod_wsgi, (which itself is behind a global nginx, but that architecture is 
>> a webfaction convention which I think is not relevent).
>>
>> Below is the request full content:
>>
>> *POST /examples/simple_examples/status/foo/bar.json HTTP/1.1*content-type: 
>> application/jsonHost: example.comContent-Length:14user-agent: fake
>> Connection:Keep-Alive
>>
>>
>> {"foo": "bar"}
>>
>>
>> And below is part of the web2py response, showing the request content. You 
>> can see web2py got the correct content type header, but still fail to decode 
>> the json payload in request.
>>
>> env:
>>
>>
>>
>>
>>
>>
>> content_length:
>> 14
>> content_type:
>> application/json
>> http_connection:
>> close
>> http_forwarded_request_uri:
>> /examples/simple_examples/status/foo/bar.json
>> http_host:
>> sandbox.xxxxxxxx.com
>> http_http_x_forwarded_proto:
>> http
>> http_https:
>> off
>> http_user_agent:
>> fake
>> http_x_forwarded_for:
>> 107.23.xxx.xxx
>> http_x_forwarded_host:
>> sandbox.xxxxxxxx.com
>> http_x_forwarded_proto:
>> http
>> http_x_forwarded_server:
>> sandbox.xxxxxxxx.com
>> http_x_forwarded_ssl:
>> off
>>
>>
>> post_vars:
>>
>> vars:
>>
>> wsgi:
>> environ:
>> CONTENT_LENGTH:
>> 14
>> CONTENT_TYPE:
>> application/json
>>
>>
>>
>>
>>
>>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to