Opened 8 years ago

#269 new defect

HTTP-to-foolscap doesn't yield useful error

Reported by: Brian Warner Owned by:
Priority: major Milestone: eventually
Component: negotiation Version: 0.12.3
Keywords: Cc:

Description

I made the Foolscap negotiation protocol look like HTTP for two reasons: to allow ordinary HTTP servers to act as redirectors, and to give a useful error message if you accidentally point a web browser at a Foolscap port.

It appears that the latter isn't happening, at least not any more. If I do a curl to a URL made up from HOST and PORT, I get zero bytes of output followed by a connection closed.

In negotiate.py, we get to handlePLAINTEXTServer, and hit the if not url.startswith("/id/"): check, which then raises BananaError. However it looks like BananaError at that point doesn't cause any text to be written back to the client.

So the task for this ticket is to make sure that *some* form of error message gets written, preferably one that says "hey this is foolscap not http".

Change History (0)

Note: See TracTickets for help on using tickets.