Those are in fact the two modules for which I am now working on new versions. (Both original authors have agreed to make me co-maintainer.)

Your comment sounds like you're recommending my choice 2 (copy the scheme of the target URL). That's what ProxyPAC does now. ProxyAutoConfig simply returns what FindProxyForURL returns, namely a URL without a scheme.

I'm trying to resolve an HTTP::ProxyPAC bug report against returning the target scheme, in which the reporter states that one can't have more than one scheme/protocol on a given port. That's true for an endpoint server, but I'm not sure it's true for a proxy.

But consider what the next-downstream software entity (like LWP::UserAgent) needs to do. It needs to send its request/original URL to the given port on the proxy, which is identified by either its name or its IP address. One purpose of a scheme is to identify a default port (like http->80), but we already have an explicit port. The other purpose of a scheme is to identify the protocol that should be spoken/exchanged.

I think I will try and see how LWP::UserAgent reacts if I give it a proxy without a scheme, and let its response dictate whether or not to go with choice 3. Then I will interact with the proxy at work to further refine the proper choice. Unless anyone else has further words of wisdom.

Thanks for replying,
cmac

In reply to Re^2: scheme for proxy? by cmac
in thread scheme for proxy? by cmac

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.