"No backend servers available" using httplib

Diez B. Roggisch deets at nospam.web.de
Thu Sep 27 08:20:45 EDT 2007


Henrik Lied wrote:

> On Sep 27, 11:56 am, Bruno Desthuilliers <bruno.
> 42.desthuilli... at wtf.websiteburo.oops.com> wrote:
>> Henrik Lied a écrit :
>>
>> > Hi there!
>>
>> > I'm using a recipe found on ASPN [1] to upload some data to an
>> > external server.
>>
>> > The request fails, and all I get in response is "No backend servers
>> > available".
>>
>> > So I'm wondering: Is this a known exception-message in httplib,
>>
>> If it was, you should have a full traceback then.
>>
>> > or
>> > could it be an error in the requested external resource?
>> > [1]:http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/146306
>>
>>  From the recipe's code and the message, looks like you're connecting to
>> (or via) a proxy which fails to relay to the real server.
> 
> Hello Bruno,
> 
> The actual reason was quite a bit simpler: The receiving server
> required a certain keyword to be first in the request - which I was
> not aware of. So now it works - but it's not perfect:
> 
> Is there a way to stream the file content over the connection? The way
> it works now, the whole file is loaded into memory, right?

It appears not, as the httplib uses sendall on the underlying socket.

Diez



More information about the Python-list mailing list