David Sanders <[EMAIL PROTECTED]> writes: > 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)); > > > DB<1> 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);
Now I'm confused. Previously you said that get() was hanging. Now you are telling me that it returns undef. > > Does this happen with any page you try to download or does this > > behaviour depend on the server? > > 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? Only thing wrong was that it was too heavy and I wanted LWP::Simple::get() to be really lightweight and fast to load for the common http case. Regards, Gisle