According http://www.w3.org/Protocols/rfc2616/rfc2616-sec8.html#sec8.2.3 client has to wait for 100 (Continue) status, before making POST (on HTTP 1.1 server that requires this header).
I can't understand how can Python do this. For example:
conn = httplib.HTTPConnection(url)
conn.putrequest('POST', page)
conn.putheader(...)
conn.putheader('Expect', '100-continue')
conn.endheaders()
Now, I don't see other options then send the data:
conn.send(data)
in which case I get error, when asking for response:
error: [Errno 10053] An established connection was aborted by the software in your host machine
How can I ask for status 100, so that I can send the data?
I don't think
httplib
supports this (very well); see the discussion in this requests ticket, specificallyThe author of that comment, Augie Fackler (durin42) also mentions his own
httpplus
library.A quick glance at the source code shows promise that it does handle
Expect: 100-Continue
correctly: