On Sat, 2006-05-13 at 09:11 -0700, Martin Ostrovsky wrote:
> Hello,
> 
> Is there a reason why CONTENT-LENGTH is always blank in the environ
> dictionary that gets passed to WSGIRequest ?
> (django/core/handlers/wsgi.py)

What web server front-end are you using to handle the request?
Development server? Twisted? Other?

> 
> Why isn't it just automatically computed based on the length of the
> request's content?

I'm not sure in this specific case, but in general this is not going to
always be possible. For example, if the incoming content is passed to
the handler before it is fully received (streaming input). Django does
not have good streaming input handling at the moment, so that will not
be the case here, but I just want to point out that the solution is not
necessarily as simple as this.

> 
> The reason I ask is because I'm getting an exception raised on line 119
> in wsgi.py when the WSGI object tries to return its raw post data:
> 
> self._raw_post_data =
> self.environ['wsgi.input'].read(int(self.environ["CONTENT_LENGTH"]))
> ValueError: invalid literal for int():
> 
> , which fails because of the empty string value.

On all requests, or only on a particular type of request?

Regards,
Malcolm


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" 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/django-developers
-~----------~----~----~----~------~----~------~--~---

Reply via email to