Chris Withers wrote:
> - Apache in this instance responds with HTTP 1.1, even though the wget
> request was 1.0, is that allowed?
> 
> - Apache responds with a chunked response only to httplib. Why is that?
> 

I find it very confusing that you say "Apache" since your really want to
say "Coyote" which is to say "Tomcat".

http11processor.j...@1547:
    if (entityBody && http11 && keepAlive) {
        outputBuffer.addActiveFilter
            (outputFilters[Constants.CHUNKED_FILTER]);
        contentDelimitation = true;
        headers.addValue(
            Constants.TRANSFERENCODING).setString(Constants.CHUNKED);
    } else {
        outputBuffer.addActiveFilter
            (outputFilters[Constants.IDENTITY_FILTER]);
    }

So, as Oleg said, it's because httplib talks HTTP/1.1 and wget talks
HTTP/1.0. All HTTP/1.1 client must support chunked transfer-encoding,
and apparently Tomcat/Coyote defaults to that unless it is either an
empty message, not a HTTP/1.1 client, or the request is not to be kept
alive ("Connection: close" or no more keep-alive slots on the server).

As Simon said, changing this to do ''.join(chunks) is really the best
first step to take.

-Scott

-- 
Scott Dial
sc...@scottdial.com
scod...@cs.indiana.edu
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to