Hello.
The inlined patch fixes phttp.monitor for RFC compliance... uses \r\n
everywhere in its requests. Just \n leads to a "400 Bad Request" on IIS
6.0 in native mode.
Index: phttp.monitor
===================================================================
RCS file: /home/erik/.cvs/mon/mon.d/phttp.monitor,v
retrieving revision 1.3
retrieving revision 1.7
diff -u -r1.3 -r1.7
--- phttp.monitor 2003/05/27 09:54:34 1.3
+++ phttp.monitor 2003/10/14 15:22:25 1.7
@@ -351,9 +351,10 @@
sub defaultvalues {
$port = defined($port) ? $port : 80;
$request = defined($request) ? $request
- : 'HEAD / HTTP/1.0\nUser-Agent: phttp.monitor\n\n';
+ : 'HEAD / HTTP/1.0\r\nUser-Agent: phttp.monitor\r\n\r\n';
# Thanks so much Larry Wall ! finger in the nose.
$request =~ s!\Q\n!\n!g ;
+ $request =~ s!\Q\r!\r!g ;
$nbrequests = defined($nbrequests) ? $nbrequests : 1;
$inserthost = defined($inserthost) ? $inserthost : 1;
$timeout = defined($timeout) ? $timeout : 20;
@@ -459,7 +460,7 @@
$0 \\
--port=80 \\
--nbrequests=1 \\
- --request='HEAD / HTTP/1.0\\nUser-Agent: phttp.monitor\\n\\n' \\
+ --request='HEAD / HTTP/1.0\\r\\nUser-Agent: phttp.monitor\\r\\n\\r\\n' \\
--inserthost \\
--timeout=20 \\
--softimeout=20 \\
@@ -480,7 +481,7 @@
my $message = qq!$request!;
if ($inserthost) {
- $message =~ s/\n\n/\nHost: $client{$id}{'host'}\n\n/;
+ $message =~ s/\r\n\r\n/\r\nHost: $client{$id}{'host'}\r\n\r\n/;
};
$client{$id}{"wbuf"} = $message x 1;
--
Erik I. Bols�, Triangel Software AS | Skybert AS
Tlf: 712 41 694 Mobil: 915 79 512
_______________________________________________
mon mailing list
[EMAIL PROTECTED]
http://linux.kernel.org/mailman/listinfo/mon