HTTP-Proxy - Re: Suggestion for mutator to convert unknown schemes

Posted on Sun Aug 14 11:17:45 2005 by bblakley in response to 883 (See the whole thread of 8)
Re: Suggestion for mutator to convert unknown schemes

I have released the source code for my proxy server, but not on CPAN. It is available at www.HoTTProxy.org. I don't know if it's good enough for CPAN. :-) It started out just being for me, and then I decided to release it for all to use so I had to clean it up a bit and make it a little more user friendly. I'm also working on a web based administration console for it using the HTTP::Server::Simple::CGI module (which is also great).

When you say you'd "return false" if the protocol is not supported, it sounds like the request would be short circuited and wouldn't make it through to the filters (and for my purposes, it needs to). If we wanted to make the concept a little more generic perhaps instead of a true/false mutator that always maps unknown schemes to http, it would make more sense to have a mutator like:

mapUnknownProtocolTo => 'http'

so that each developer could choose, for their particular situation, what protocol to treat unsupported protocols as. This would provide maximum flexibility and allow the requests to pass through to the various filters, etc., just like any other request of that protocol.

What do you think?

Direct Responses: 885 | Write a response