Hello,

I created a script for checking HTTP like below:

use strict;
use IO::Socket;

my $host = shift || '127.0.0.1';
my $port = shift || 80;

my $sock=IO::Socket::INET->new(PeerAddr => $host,
                               PeerPort => $port,
                               Proto    => 'tcp');
unless (defined $sock) {
  exit -1;
}


print $sock "GET / HTTP/1.0\n\n";

...

For above line, if the remote server OS is Windows, should I send "GET / 
HTTP/1.0\r\n\r\n" instead of "GET / HTTP/1.0\n\n" ?

If yes, then the check script seems not useful, because before each checking, 
we must know what the OS of remote server is.

Please give the suggestion.

Thanks.


      Access Yahoo!7 Mail on your mobile. Anytime. Anywhere.
Show me how: http://au.mobile.yahoo.com/mail

--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to