aplonis has asked for the wisdom of the Perl Monks concerning the following question:
Help me out with a most perplexing mystery, please. I have two Perl scripts, a longish one using LWP which is here...
gus_barometric_pressure.pl
...and a short (test only) script which looks like this...
use strict; use warnings; use Win32::Internet; my $INET = new Win32::Internet(); my $file = $INET->FetchURL("http://www.yahoo.com"); print $file;
Those programs both work fine on one PC but not on another. Both PCs are in a company network and being run on my network login account. And both PCs have the same version of ActiveState Perl and the same modules. I get no Perl errors on either PC. But on one, and not on the other, both scripts fail to connect to their web pages, getting no data.
Now here is the really funny thing. Both PCs can see external web pages in MSIE, but only one can see the web in Firefox. The same PC which can't connect in Firefox is the one which also fails using LWP and Win32::Internet modules. And the only difference between their IP settings appears to be that the one which fails has different secondary WINS server. There does not appear to be any proxy, not that I can find, for MSIE.
How can this be? And more importantly, how can I work around it? What questions do I need to pose to our IT department so that they might enlighten me? Our local IT is but one person for a large plant, and not an especially inquisitive network guru. A network printer was left unusable for months because it was a low priority until I sorted it out myself. Our local IT person is kept busy full time just implementing things laid out by higher IT folks in another city out-of-state. Just asking there with no ideas to investigate would be a dead end. So I need to present my questions very concisely so that they will be passed up the line.
Thanks, kindly,
Gan Starling
ADDENDA:
In retrospect, I should prefer a Perl answer above all else. It was from having compared ipconfig /all for both machines that I determined, as mentioned in my initial post, that the only difference was the Secondary WINS IP. I also mentioned therein my use of the same network login for both.
MSIE works. So HTTP must work. So I guess my question might better have been, "How can the network distinguish between an HTTP request made by MSIE from one made to the same URL by LWP or by Win32::Internet?" Alternately, I might have better asked, "Is it possible to make them indistinguishable so that Perl can emulate MSIE as far as the network is concerned?"
Again, neither HTTP nor the URL is restricted as MSIE can see it. Only LWP and Win32::Internet are unable to see that URL. That can't possibly be a security issue, not with MSIE's reputation. So a more purely Perl-ish question might be, "How can I make LWP sufficiently emulate an MSIE HTTP request?" I have already tried using the MSIE user-agent ID string and that did not work.
Respectfully,
Gan Starling
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: LWP and Win32::Internet fail where MSIE sees all.
by glasswalk3r (Friar) on Feb 07, 2007 at 19:11 UTC | |
|
Re: LWP and Win32::Internet fail where MSIE sees all.
by BrowserUk (Patriarch) on Feb 07, 2007 at 14:57 UTC | |
by aplonis (Pilgrim) on Feb 07, 2007 at 15:15 UTC | |
by BrowserUk (Patriarch) on Feb 07, 2007 at 15:21 UTC | |
by aplonis (Pilgrim) on Feb 07, 2007 at 15:27 UTC | |
by BrowserUk (Patriarch) on Feb 07, 2007 at 16:03 UTC | |
| |
|
Re: LWP and Win32::Internet fail where MSIE sees all.
by NiJo (Friar) on Feb 07, 2007 at 20:20 UTC | |
|
Re: LWP and Win32::Internet fail where MSIE sees all.
by spadacciniweb (Curate) on Feb 08, 2007 at 10:03 UTC |