The WSGI specification doesn't support chunked request content. I am
presuming therefore that to get something working when using
WSGIChunkedRequest, that you would need to have modified web.py in a
way that allowed it to work. Have you done anything like that?
If you don't then web.py will likely pass through an empty string for
the request content, which seems to be what that error is indicating
that elementtree found.
Graham
On 19 October 2012 22:01, Aashish Pathak <
aashish...@gmail.com> wrote:
> I have deployed my web.py application on Apachev2.2 with mod_wsgiv3.4.
> The web.py application accepts the requests from third party which are
> chunked transfer encoded.
> I have enabled chunked encoded requests with the help of
> 'WSGIChunkedRequest' directive.
>
> Now, i am facing something streaming related issue,
> here is the traceback,
> ---
> Traceback (most recent call last):
> File
> "/usr/local/lib/python2.6/dist-packages/web.py-0.36-py2.6.egg/web/application.py",
> line 237, in process
> return self.handle()
> File
> "/usr/local/lib/python2.6/dist-packages/web.py-0.36-py2.6.egg/web/application.py",
> line 228, in handle
> return self._delegate(fn, self.fvars, args)
> File
> "/usr/local/lib/python2.6/dist-packages/web.py-0.36-py2.6.egg/web/application.py",
> line 409, in _delegate
> return handle_class(cls)
> File
> "/usr/local/lib/python2.6/dist-packages/web.py-0.36-py2.6.egg/web/application.py",
> line 385, in handle_class
> return tocall(*args)
> File "/var/www/egauge/server.py", line 67, in POST
> data = parse(web.data(), excluded=inactive_meters)
> File "/home/ubuntu/plotwatt/readings_servers/egauge/egauge_parser.py", line
> 27, in parse
> logging.warn(xml)
> File
> "/usr/local/lib/python2.6/dist-packages/elementtree-1.2.7_20070827_preview-py2.6.egg/elementtree/ElementTree.py",
> line 1012, in XML
> return api.fromstring(text)
> File
> "/usr/local/lib/python2.6/dist-packages/elementtree-1.2.7_20070827_preview-py2.6.egg/elementtree/ElementTree.py",
> line 183, in fromstring
> return parser.close()
> File
> "/usr/local/lib/python2.6/dist-packages/elementtree-1.2.7_20070827_preview-py2.6.egg/elementtree/ElementTree.py",
> line 1301, in close
> self._parser.Parse("", 1) # end of data
> ExpatError: no element found: line 1, column 0
> ---
>
> I have seen some work arounds for Django application here,
>
http://stackoverflow.com/questions/12091067/handling-http-chunked-encoding-with-django
>
> Is there anything similar i can do with web.py as well ?
>
> --
> You received this message because you are subscribed to the Google Groups
> "modwsgi" group.
> To view this discussion on the web visit
>
https://groups.google.com/d/msg/modwsgi/-/PffmdxE7cFgJ.
> To post to this group, send email to
mod...@googlegroups.com.
> To unsubscribe from this group, send email to
>
modwsgi+u...@googlegroups.com.
> For more options, visit this group at
>
http://groups.google.com/group/modwsgi?hl=en.