On Fri, 2010-09-17 at 14:14 -0400, Ian Bicking wrote: > OK, so maybe it should just be clarified: > > * Middleware and servers should not modify or add Content-Length, > Date, or other headers unless they have reason to do so, and they must > ensure that the response is valid (e.g., there should never be two > Content-Length headers).
I tried adding such a statement to a local copy of the specification, but I wasn't able to really "nail" it. If someone here can come up with some unambiguous wording (defining "unless they have reason to do so" and "other headers" above would be a good start), I'd just put it in. > It still seems reasonable that *if* there is no Content-Length, and > the server can guess easily enough (mostly it is returned an actual > list/tuple that we know can be introspected fast and without side > effects), then it's perfectly reasonable to set it -- but certainly > the server doesn't "own" that header (or any other, except maybe some > connection-related headers?). I'm -0 on the server trying to guess the Content-Length header. It just doesn't seem like much of a burden to place on an application and it's easier to specify that an application must do this than it is to specify how a server should behave in the face of a missing Content-Length. I also believe Graham has argued against making the server guess, I presume this causes him some pain somehow (probably underspecification in WSGI). - C _______________________________________________ Web-SIG mailing list Web-SIG@python.org Web SIG: http://www.python.org/sigs/web-sig Unsubscribe: http://mail.python.org/mailman/options/web-sig/archive%40mail-archive.com