I actually am seeing some input, but it is divided into several, well,
chunks. I guess it's the same problem as seeing no input - I'd say
you're right and chunked encoding is silently unsupported (it would be
nice if Django said something though).
However, could you please suggest any workaround? If mod_python does
not work, what should I use? (My goal is to be able to receive chunked
requests in some normal way in my django application).

On Nov 1, 10:28 am, Graham Dumpleton <[EMAIL PROTECTED]>
wrote:
> On Nov 1, 10:40 am, "Tomáš Brambora" <[EMAIL PROTECTED]> wrote:
>
> > I have a standard Django installation without any changes in the
> > settings (except adding mysql db to the settings.py) and I'm sending
> > the message to localhost:8000, so there is no proxy or anything else
> > in the way. Still, the request body comes after me sending the
> > response...
>
> As I said in the other similar thread you created about this.
>
> If you are getting empty input on read, then you are using hosting
> mechanism that doesn't properly filter out chunked request content as
> not being supported and instead assumes that content length of
> request  was 0.
>
> In other words, chunked request content is not supported. Most hosting
> mechanisms will flag it as an error. The internal Django development
> server appears just to assume that content length on request is 0
> since Content-Length header wouldn't be set. Thus why you are seeing
> no input.
>
> Graham
>
>
>
> > On Fri, Oct 31, 2008 at 11:50 PM, Graham Dumpleton
>
> > <[EMAIL PROTECTED]> wrote:
>
> > > [EMAIL PROTECTED] wrote:
> > >> Hello,
> > >> I'm trying to receive a possibly large XML message via HttpRequest
> > >> (POST method) with chunked encoding. However, when I send a response,
> > >> I found out (using Wireshark) that the response is being sent before
> > >> the whole POST request body is available. I expected Django to be
> > >> buffering the chunks and that the request would be complete, but
> > >> that's apparently not happening...
>
> > >> I'm reading the body like this:
> > >> request.POST.values()[0]
>
> > >> (Which is probably a wrong way, but I don't know how to do it
> > >> otherwise.)
>
> > > What hosting mechanism are you using. Anything that uses WSGI (eg,
> > > mod_wsgi, fastcgi/flup) or mod_python will not work as neither WSGI
> > > specification or mod_python support chunked transfer encoding on
> > > request content. Certainly for mod_python and mod_wsgi, it should give
> > > an error back before even gets to Django saying that content length
> > > required to be set.
>
> > > Graham
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to