Unexpected 411 error response using httplib

John Gordon gordon at panix.com
Fri Sep 11 18:53:16 CEST 2009

In <h7h963$4aj$1 at reader1.panix.com> John Gordon <gordon at panix.com> writes:

> As you can see, I am including the call to putheader() for Content-Length,
> and the debugging output confirms that the header is present in the outgoing
> message.

> So why am I getting a 411 Length Required error?

To follow up my own post, this was happening because of a trailing
newline in auth, put there by base64.encodestring().

The newline made the server stop processing any subsequent headers.

John Gordon                   A is for Amy, who fell down the stairs
gordon at panix.com              B is for Basil, assaulted by bears
                                -- Edward Gorey, "The Gashlycrumb Tinies"

More information about the Python-list mailing list