In werkzeug's WSGIRequestHandler, CONTENT-LENGTH defaults to an empty
string ('') if the client did not provide a Content-Length header.
This seems wrong to me and is causing me problems in my flask web service,
which is trying to proxy requests. I receive a request and then pass it
along to another server, which then returns HTTP 400 due to the bad
Content-Length. According to RFC 2616, Content-Length must be a number.
Maybe the empty string was intended to be werkzeug's signifier for a
non-existent Content-Length, rather than an actual Content-Length value
that could be used directly. If that's the case, then I would modify flask
so that Content-Length isn't included in the incoming request's headers.
Bottom line, I believe that a client request that is missing a
Content-Length header should not result in an incoming flask request with
the Content-Length equal to the empty string.
Thoughts?
Peter
--
You received this message because you are subscribed to the Google Groups
"pocoo-libs" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/pocoo-libs.
For more options, visit https://groups.google.com/d/optout.