I have added one line ( import pdb; pdb.set_trace() ) to httplib\'s HTTPConnection.putheader, so I can see what\'s going on inside.