Index: curl/tests/sshserver.pl
===================================================================
RCS file: /cvsroot/curl/curl/tests/sshserver.pl,v
retrieving revision 1.6
diff -u -r1.6 sshserver.pl
--- curl/tests/sshserver.pl	29 Mar 2007 18:46:09 -0000	1.6
+++ curl/tests/sshserver.pl	30 Mar 2007 03:03:29 -0000
@@ -56,20 +56,25 @@
 
 my $conffile="curl_sshd_config";	# sshd configuration data
 
-# Search the PATH for sshd.  sshd insists on being called with an absolute
-# path for some reason.
-my $sshd = searchpath("sshd", File::Spec->path());
+# Searching for sshd and sftp-server will be done first
+# in the PATH and afterwards in other common locations.
+my @spath;
+push(@spath, File::Spec->path()); 
+push(@spath, @sftppath); 
+
+# sshd insists on being called with an absolute path.
+my $sshd = searchpath("sshd", @spath);
 if (!$sshd) {
-	print "sshd is not available\n";
+	print "sshd$exeext not found\n";
 	exit 1;
 }
 if ($verbose) {
 	print STDERR "SSH server found at $sshd\n";
 }
 
-my $sftp = searchpath("sftp-server", @sftppath);
+my $sftp = searchpath("sftp-server", @spath);
 if (!$sftp) {
-	print "Could not find sftp-server plugin\n";
+	print "Could not find sftp-server$exeext plugin\n";
 	exit 1;
 }
 if ($verbose) {
