This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author cdwave
Date 2005-11-03.12:23:56
SpamBayes Score
Marked as misclassified
I bumped into this code in HTTPConnection,

        # read until we get a non-100 response
        while True:
            version, status, reason = self._read_status()
            if status != CONTINUE:
            # skip the header from the 100 response
            while True:
                skip = self.fp.readline().strip()
                if not skip:
                if self.debuglevel > 0:
                    print "header:", skip

This basically silently eats any 100-continue response
that the server may send to us.
This is not according to the spec - the client should
WAIT for the 100-continue, and then post the data.
Because of this code snippet, it is impossible for a
client to wait for a 100-continue response, since it is
silently eaten by this code.

A correct implementation would be:

- Check the outgoing headers for "Expect: 100-continue"
- If that is present, set an "expectcontinue" flag.
- If the client tries to send data to the connection,
or if the data member was set in the request, wait for
the server to send the 100 response BEFORE sending out
any data at all, if the flag is set.
- If the server fails to send it, the connection will
eventually time out.

I'd be happy to provide an implementation myself, as it
doesn't seem hard to implement and would really help my
Date User Action Args
2008-01-20 09:58:13adminlinkissue1346874 messages
2008-01-20 09:58:13admincreate