Opened 10 years ago

Closed 10 years ago

#2922 defect closed duplicate (duplicate)

web.ProxyClientFactory does not close request after sending error message

Reported by: lewq Owned by:
Priority: normal Milestone:
Component: web Keywords: proxyclientfactory, gateway error
Cc: Branch:
Author:

Description

In Twisted Web's proxy.py:

    def clientConnectionFailed(self, connector, reason):
        self.father.transport.write("HTTP/1.0 501 Gateway error\r\n")
        self.father.transport.write("Content-Type: text/html\r\n")
        self.father.transport.write("\r\n")
        self.father.transport.write('''<H1>Could not connect</H1>''')

Should be suffixed by:

        self.father.finish()

Otherwise the other end waits forever (or until she closes the connection) for the failure to get to them. This bit me in the arse when using VhostMonster and trying to detect failed proxied connections.

Thanks for an awesome system guys!

Change History (2)

comment:1 Changed 10 years ago by therve

Resolution: duplicate
Status: newclosed

This is a duplicate of #1089.

comment:2 Changed 7 years ago by <automation>

Owner: jknight deleted
Note: See TracTickets for help on using tickets.