in reply to Re: HTTP GET without LWP
in thread HTTP GET without LWP

That was my first thought, but breaking the URL into host and URI didn't solve the issue. If I figure anything else out, I'll post it here.

Update: sutch seems to have hit the nail on the head. If you send "GET /authenticate.cgi HTTP/1.0" alone it errors out. The key is attaching "Host: login.gatorlink.ufl.edu" to the end of the request, before your $BLANK variable.

while(my $url = shift @ARGV) { unless($url =~ m{^http://([A-Za-z0-9\.\-]+)/(.*)$}) { print "$0: invalid url: $url\n"; next; } my($host, $uri) = ($1, $2); my $remote = IO::Socket::INET->new(Proto => "tcp", PeerAddr => $host, PeerPort => "http(80)"); unless ($remote) { die "Cannot connect to http daemon on $host\n" } $remote->autoflush(1); print $remote "GET /$uri HTTP/1.0\nHost: $host" . $BLANK; print while(<$remote>); print "\n$sep"; close $remote; }
Your end result might look something like that. You really should just use LWP. =)

'kaboo