[Web-SIG] WSGI input filter that changes content length.

Graham Dumpleton grahamd at dscpl.com.au
Mon Jan 15 23:38:50 CET 2007


Robert Brewer wrote ..
> Graham Dumpleton wrote:
> > My understanding is that content encoding is different
> > to transfer encoding, ie., is not hop by hop in this
> > sense and that the same statements don't apply.
> 
> No, you're right. "Content-Encoding: gzip" is not hop-by-hop, and should
> therefore be allowed in middleware. But as you've noticed, that doesn't
> mean it's easy. ;)

A good example of why it isn't hop by hop is that a client could use 'Content-
Encoding: gzip' and both the web server and the WSGI stack could simply not do
anything about it, but a WSGI proxy middleware could then pass the request as
is through to some other web server which would then decompress it. Because
it can be passed through in this way, it isn't really hop by hop.

Graham


More information about the Web-SIG mailing list