in reply to Another one perl LWP question

Referencing Re^3: proxy problwm LWP, which shows a working snippet, suggests paying detailed attention to where you specify 'http' and where 'https' in your various calls.

Also, I've found that the trailing slash is a nit-picky detail which sometimes is critical.

Replies are listed 'Best First'.
Re^2: Another one perl LWP question
by m4merg (Initiate) on Jul 03, 2015 at 13:16 UTC
    Thanks for answer, i've changed 'https' to 'http', 'ftp' at this line $ua->proxy('https', $proxy);

    and it worked!!! But why 'https' works for the http://www.example.com/bar though it doesnt work for the desired one URL. As i understand this is connection to proxy but not to the web site. I've changed the connection to proxy (which was actually working for the example site) without changing access to the sci-hub and it worked. I can't see any logic here - what the problem?

      In this case, httpworks and httpsdoesn't because the proxycall is establishing which kinds of connections it is supposed to handle for you, and you are making an httpcall.

      At a guess to your other example, perhaps that one is getting converted to an httpscall behind the scenes, thus enabling your proxycall to handle it?.