Re: No case on push_header
Gisle Aas [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Rob Dixon [EMAIL PROTECTED] writes: Perhaps a little better than hacking the module is to mess with the package hash %standard_case in the calling code? $HTTP::Headers::standard_case{xxx-xxx-xxx} = xxx-xxx-xxx; would do the trick This will not work as %standard_case is a lexical. There is no way to get to it from outside the HTTP::Headers module. Thanks Gisle: I missed that. It's probably just as well anyway :) Rob
Re: Chaining proxy servers
Le vendredi 19 septembre 2003 à 16:07, [EMAIL PROTECTED] écrivait: I've seen one utility for Windows which allows this, called proxychain. It's hard to find now, but check google. It claims to be able to chain multiple proxies, without having to reconfigure any of the proxies in the chain in any way. Not sure what they're doing, I may have to sniff it and see. I don't think HTTP lets any element in the chain control something other than the next step (proxy) and the final step (the server). My guess about what what the proxychain tool does is that it does a CONNECT request to the first proxy, asking to be connected to the second proxy, and then again, until it actually does a GET request. That's only useful when you want real anonymity through open proxies. -- Philippe BooK Bruhat Everyone acts their age... mental, if not physical. (Moral from Groo The Wanderer #92 (Epic))
LWP::Simple get() on win32
I am having a problem with LWP::Simple::get() on a Windows XP installation. (LWP version 5.69). The following command hangs up (requiring a Cntrl-c): perl -e use LWP::Simple; my \$out=get(\http://www.cpan.org\;);print \$out but this works perl -e use LWP::Simple;getprint(\http://www.cpan.org\;) both command work fine on my Linux machine. Any help would be appreciated. -- David [EMAIL PROTECTED]
Re: LWP::Simple get() on win32
David Sanders [EMAIL PROTECTED] writes: I am having a problem with LWP::Simple::get() on a Windows XP installation. (LWP version 5.69). The following command hangs up (requiring a Cntrl-c): perl -e use LWP::Simple; my \$out=get(\http://www.cpan.org\;);print \$out but this works perl -e use LWP::Simple;getprint(\http://www.cpan.org\;) LWP::Simple::get use a different implementation by default. You force it to use the full LWP by importing $ua variable from LWP::Simple. The getprint() function always use the full LWP. I don't see a problem here when executing your example code on Windows XP. It would be helpful if you could try to run the hanging code under the debugger to figure out what happens. Regards, Gisle
Re: LWP::Simple get() on win32
On Saturday 20 September 2003 02:44 pm, Gisle Aas wrote: David Sanders [EMAIL PROTECTED] writes: I am having a problem with LWP::Simple::get() on a Windows XP installation. (LWP version 5.69). The following command hangs up (requiring a Cntrl-c): perl -e use LWP::Simple; my \$out=get(\http://www.cpan.org\;);print \$out but this works perl -e use LWP::Simple;getprint(\http://www.cpan.org\;) LWP::Simple::get use a different implementation by default. You force it to use the full LWP by importing $ua variable from LWP::Simple. The getprint() function always use the full LWP. I don't see a problem here when executing your example code on Windows XP. It would be helpful if you could try to run the hanging code under the debugger to figure out what happens. Regards, Gisle Under the debugger it just hangs also; here is a test case: Microsoft Windows XP [Version 5.1.2600] (C) Copyright 1985-2001 Microsoft Corp. C:\cat test5.pl #!perl -w # use LWP::Simple; use strict; use warnings; use diagnostics; my @output = get(http://www.sandersweb.net/;); if (! @output) { die Cannot get file\n; } print @output; C:\perl -d test5.pl Loading DB routines from perl5db.pl version 1.19 Editor support available. Enter h or `h h' for help, or `perldoc perldebug' for more help. main::(test5.pl:8): my @output = get(http://www.sandersweb.net/;); DB1 n (hangs at this point) -- David [EMAIL PROTECTED]
Re: [PATCH] URI test failure on OS/2
On 19 Sep 2003, Gisle Aas wrote: [...] The current behaviour is based on what made sense to me, not on how stuff actually works in other apps on Windows. Anybody know a place that describes the de-factor rules for file: URLs on Windows? [...] Probably a useless snippet: apparently both ':' and '|' are accepted by both Netscape 4 and IE (version 5 or 6, I guess). http://www.google.com/groups?threadm=87n0e1zqzh.fsf%40pobox.com John
Re: LWP::Simple get() on win32
David Sanders wrote: I am having a problem with LWP::Simple::get() on a Windows XP installation. (LWP version 5.69). The following command hangs up (requiring a Cntrl-c): perl -e use LWP::Simple; my \$out=get(\http://www.cpan.org\;);print \$out but this works perl -e use LWP::Simple;getprint(\http://www.cpan.org\;) both command work fine on my Linux machine. Hi David. The code string you're specifying is a command-prompt string, not a Perl one, so the dollars don't need escaping. It's also easier to use single quotes within the code if you can, or qq() if you need interpolation. Try these: perl -e use LWP::Simple;getprint('http://www.cpan.org') perl -e use LWP::Simple; my $out=get(qq(http://www.cpan.org)); print $out HTH, Rob
Re: LWP::Simple get() on win32
David Sanders [EMAIL PROTECTED] writes: Under the debugger it just hangs also; here is a test case: Microsoft Windows XP [Version 5.1.2600] (C) Copyright 1985-2001 Microsoft Corp. Where did this text come from. My machine says it is Microsoft Windows XP, Home edition, Versjon 2002, Service Pack 1. A bit strange that the word Version was spelled in Norwegian :) main::(test5.pl:8): my @output = get(http://www.sandersweb.net/;); DB1 n (hangs at this point) So, you need to step into the function to find out which part hangs. The 's' command in the debugger does that. Regards, Gisle
Re: LWP::Simple get() on win32
On Saturday 20 September 2003 04:46 pm, Gisle Aas wrote: David Sanders [EMAIL PROTECTED] writes: Under the debugger it just hangs also; here is a test case: Microsoft Windows XP [Version 5.1.2600] (C) Copyright 1985-2001 Microsoft Corp. Where did this text come from. My machine says it is Microsoft Windows XP, Home edition, Versjon 2002, Service Pack 1. A bit strange that the word Version was spelled in Norwegian :) Its the pro edition. main::(test5.pl:8): my @output = get(http://www.sandersweb.net/;); DB1 n (hangs at this point) So, you need to step into the function to find out which part hangs. The 's' command in the debugger does that. Regards, Gisle Thanks, here is where it hangs: LWP::Simple::_trivial_http_get(c:/Perl/site/lib/LWP/Simple.pm:311): 311: print $sock join(\015\012 = 312:GET $path HTTP/1.0, 313:Host: $netloc, 314:User-Agent: lwp-trivial/$VERSION, 315:, ); DB1 n LWP::Simple::_trivial_http_get(c:/Perl/site/lib/LWP/Simple.pm:317): 317: my $buf = ; DB1 n LWP::Simple::_trivial_http_get(c:/Perl/site/lib/LWP/Simple.pm:318): 318: my $n; DB1 n LWP::Simple::_trivial_http_get(c:/Perl/site/lib/LWP/Simple.pm:319): 319: 1 while $n = sysread($sock, $buf, 8*1024, length($buf)); DB1 s -- David [EMAIL PROTECTED]
Re: LWP::Simple get() on win32
On Saturday 20 September 2003 05:41 pm, Gisle Aas wrote: David Sanders [EMAIL PROTECTED] writes: Thanks, here is where it hangs: [...] LWP::Simple::_trivial_http_get(c:/Perl/site/lib/LWP/Simple.pm:319): 319: 1 while $n = sysread($sock, $buf, 8*1024, length($buf)); DB1 s Is sysread hanging or is it looping here because it never returns a false value for you? the value of the $output is undefined at the end of the attempt, where: $output = get($url); Does this happen with any page you try to download or does this behaviour depend on the server? --Gisle Happens on every server I've tried. Interestingly getprint and getstore work fine. There is a function in Simple.pm called get_old. If you rename it to get (and change the other get to get_old) everything works fine. It may be that using sysread to get data from a socket (instead of recv or something) doesn't always work. What was wrong with the old way? -- David [EMAIL PROTECTED]