LWP::Simple Protocol scheme not supported

Discussion in 'Perl Misc' started by neil.shadrach@corryn.com, Mar 1, 2006.

  1. Guest

    LWP::Simple is working fine one one machine but on another one it fails
    as below.
    What might be wrong/missing?

    # perl -MLWP::Simple -e 'getprint "http://directory.intra.company.com"'
    501 Protocol scheme '' is not supported
    <URL:http://directory.intra.company.com>
     
    , Mar 1, 2006
    #1
    1. Advertising

  2. J. Gleixner Guest

    wrote:
    > LWP::Simple is working fine one one machine but on another one it fails
    > as below.
    > What might be wrong/missing?
    > # perl -MLWP::Simple -e 'getprint "http://directory.intra.company.com"'
    > 501 Protocol scheme '' is not supported
    > <URL:http://directory.intra.company.com>


    Probably need SSL support for LWP.

    Try:

    telnet directory.intra.company.com 80
    GET / HTTP/1.0


    And see if it's redirecting to https.

    I'm surprised there isn't an 'https' there. If you search the Internet
    for that error, you'll learn both how to find the answer to these things
    next time and what's needed to fix it. Or you could simply go to the
    following:

    http://search.cpan.org/src/GAAS/libwww-perl-5.805/README.SSL
     
    J. Gleixner, Mar 1, 2006
    #2
    1. Advertising

  3. Guest

    A similar UserAgent call from the same machine works:
    perl -MLWP::UserAgent -e 'my $ua=LWP::UserAgent->new;my
    $r=$ua->get("http://directory.intra.company.com");print
    "",($r->is_success?"OK".$r->content:"Failed".$r->status_line),"\n";'

    The telnet result looks ok ( to me ):

    Connected to directory.intra.company.com.
    Escape character is '^]'.
    GET / HTTP/1.0

    HTTP/1.1 200 OK
    Date: Wed, 01 Mar 2006 16:49:30 GMT
    ....


    Also the same LWP::Simple call works from a different machine.

    I'm still puzzled
     
    , Mar 1, 2006
    #3
  4. Rick Scott Guest

    ( uttered:)
    > LWP::Simple is working fine one one machine but on another one it
    > fails as below.
    > # perl -MLWP::Simple -e 'getprint "http://directory.intra.company.com"'
    > 501 Protocol scheme '' is not supported
    >
    > What might be wrong/missing?


    What is different between the two machines? OS? Versions of Perl,
    of LWP, ...?




    Rick
    --
    key CF8F8A75 / print C5C1 F87D 5056 D2C0 D5CE D58F 970F 04D1 CF8F 8A75
    APPEAL, v.t. In law, to put the dice into the box for another throw.
    :Ambrose Bierce, "The Devil's Dictionary" (1911)
     
    Rick Scott, Mar 2, 2006
    #4
  5. Guest

    The solution was to set the HTTP_PROXY environment variable to an empty
    string
    perl -MLWP::Simple -e '$ENV{"HTTP_PROXY"}="";getprint
    "http://directory.intra.company.com"'

    Thanks to all who replied
     
    , Mar 2, 2006
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Joachim Smit
    Replies:
    2
    Views:
    1,027
    Joachim Smit
    Apr 23, 2004
  2. chen
    Replies:
    2
    Views:
    2,706
  3. chen

    The authentication scheme 'NTML' is not supported

    chen, Sep 10, 2007, in forum: ASP .Net Web Services
    Replies:
    2
    Views:
    202
  4. cserold
    Replies:
    0
    Views:
    1,883
    cserold
    Apr 6, 2010
  5. Replies:
    1
    Views:
    170
    Andrew RJ
    Jul 11, 2006
Loading...

Share This Page