cmac has asked for the wisdom of the Perl Monks concerning the following question:
I've gotten involved with a couple of Perl modules that deal with Proxy Auto Configuration (PAC). The basic JavaScript function FindProxyForURL returns a proxy URL that includes a port (e.g., 800) but not a scheme (e.g., http). Yet LWP::UserAgent seems to want a scheme in the second operand of its $ua->proxy() call. My module(s) typically stand between these two software entities.
I've read some Web pages that recommend that the port used by proxy servers should not be any standard ones. Which means that my module would have a hard time deriving a scheme from the port number returned by FindProxyForURL.
The choices for my module are:
1. Always return http in the scheme part of the URI object it returns,
2. Return the scheme from the URL with which it was called, or
3. Return a URI object without a scheme.
Advice will be much appreciated. I should go find a network-oriented forum to ask this on, but Perl Monks know everything!
Thanks,
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: scheme for proxy?
by Anonymous Monk on Mar 11, 2010 at 07:38 UTC | |
by cmac (Monk) on Mar 11, 2010 at 10:16 UTC |