Hello all,

A simple one-line (plus documentation) hopefully self-explanatory patch
to support \r expansion.  Enjoy.

Sean

# HG changeset patch
# User Sean E. Millichamp <[email protected]>
# Date 1244665564 14400
# Node ID f2ae7f1372399666dc285a056d47f95a097694e6
# Parent  0821ca12c36198cbe572cb70bbafb5a619cc2699
Add \r expansion for simpletcp request string.

diff -r 0821ca12c361 -r f2ae7f137239 ldirectord/ldirectord.in
--- a/ldirectord/ldirectord.in	Mon Jun 08 19:20:28 2009 +0200
+++ b/ldirectord/ldirectord.in	Wed Jun 10 16:26:04 2009 -0400
@@ -551,7 +551,8 @@
 answer is one or more rows.  This is a required setting.
 
 For a simpletcp check, this string is sent verbatim except any occurrences
-of \n are replaced with a new line character.
+of \n are replaced with a new line character and any occurrences of \r with
+a carriage return character.
 
 B<receive = ">I<regexp to compare>B<">
 
@@ -3391,6 +3392,7 @@
 
 		my $request = $$r{request};
 		$request =~ s/\\n/\n/g ;
+		$request =~ s/\\r/\r/g ;
 
 		&ld_debug(2, "Checking simpletcp server=$$r{server} port=$d_port request:\n$request");
 		print $sock $request;
_______________________________________________
Please read the documentation before posting - it's available at:
http://www.linuxvirtualserver.org/

LinuxVirtualServer.org mailing list - [email protected]
Send requests to [email protected]
or go to http://lists.graemef.net/mailman/listinfo/lvs-users

Reply via email to