On Fri, Aug 14, 2009 at 4:23 PM, Sanjiv Singh<[email protected]> wrote:
>
> Hi,
>
> I am trying to use a wsgi app with tg2 which uses post data obtained
> by environ['wsgi.input']. But the tg2 middleware stack is urlencoding
> the data.
>
> A simplified controller method to show this:
>
>   �...@expose()
>    def read(self, **kw):
>        environ = request.environ
>        length = int(environ['CONTENT_LENGTH'])
>        post_data = environ['wsgi.input'].read(length)
>        return str(kw) + "\n" + post_data + "\n"
>
> This returns
> {'{"type": "Feature", "id": 29, "properties": {"road_name": "Peter
> Road"}}': u''}
> %7B%22type%22%3A+%22Feature%22%2C+%22id%22%3A+29%2C+%22properties%22%3A+%7B%22road_name%22%3A+%22Peter+Road%22%7D%7D=
>
>
> Is there a way to to prevent this encoding?
>
I believe it's request.body and request.body_file I always forgot take
a look at http://pythonpaste.org/webob/index.html#request

> regards
> Sanjiv
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" 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/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to