mirror of
https://github.com/moparisthebest/curl
synced 2024-08-13 17:03:50 -04:00
report pid back in the WE ROOLZ message
This commit is contained in:
parent
72673a351b
commit
0251563c98
@ -211,9 +211,12 @@ sub RETR_command {
|
|||||||
# this is the secret command that verifies that this actually is
|
# this is the secret command that verifies that this actually is
|
||||||
# the curl test server
|
# the curl test server
|
||||||
print "150 Binary junk (10 bytes).\r\n";
|
print "150 Binary junk (10 bytes).\r\n";
|
||||||
print SOCK "WE ROOLZ\r\n";
|
print SOCK "WE ROOLZ: $$\r\n";
|
||||||
close(SOCK);
|
close(SOCK);
|
||||||
print "226 File transfer complete\r\n";
|
print "226 File transfer complete\r\n";
|
||||||
|
if($verbose) {
|
||||||
|
print STDERR "FTPD: We returned proof we are the test server\n";
|
||||||
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -439,8 +442,9 @@ for ( $waitedpid = 0;
|
|||||||
|
|
||||||
print @welcome;
|
print @welcome;
|
||||||
if($verbose) {
|
if($verbose) {
|
||||||
print STDERR "OUT:\n";
|
for(@welcome) {
|
||||||
print STDERR @welcome;
|
print STDERR "OUT: $_";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
my $state="fresh";
|
my $state="fresh";
|
||||||
|
|
||||||
|
@ -88,10 +88,6 @@ static const char *docbadconnect =
|
|||||||
"HTTP/1.1 501 Forbidden you fool\r\n"
|
"HTTP/1.1 501 Forbidden you fool\r\n"
|
||||||
"\r\n";
|
"\r\n";
|
||||||
|
|
||||||
/* sent as reply to the magic to find out if we are the test server or
|
|
||||||
not */
|
|
||||||
static const char *docfriends = "HTTP/1.1 200 Mighty fine indeed\r\n\r\nWE ROOLZ\r\n";
|
|
||||||
|
|
||||||
/* send back this on 404 file not found */
|
/* send back this on 404 file not found */
|
||||||
static const char *doc404 = "HTTP/1.1 404 Not Found\n"
|
static const char *doc404 = "HTTP/1.1 404 Not Found\n"
|
||||||
"Server: " VERSION "\n"
|
"Server: " VERSION "\n"
|
||||||
@ -332,6 +328,8 @@ static int send_doc(int sock, int doc, int part_no)
|
|||||||
int cmdsize=0;
|
int cmdsize=0;
|
||||||
FILE *dump;
|
FILE *dump;
|
||||||
|
|
||||||
|
static char weare[256];
|
||||||
|
|
||||||
char filename[256];
|
char filename[256];
|
||||||
char partbuf[80]="data";
|
char partbuf[80]="data";
|
||||||
|
|
||||||
@ -340,7 +338,9 @@ static int send_doc(int sock, int doc, int part_no)
|
|||||||
case DOCNUMBER_WERULEZ:
|
case DOCNUMBER_WERULEZ:
|
||||||
/* we got a "friends?" question, reply back that we sure are */
|
/* we got a "friends?" question, reply back that we sure are */
|
||||||
logmsg("Identifying ourselves as friends");
|
logmsg("Identifying ourselves as friends");
|
||||||
buffer = docfriends;
|
sprintf(weare, "HTTP/1.1 200 OK\r\n\r\nWE ROOLZ: %d\r\n",
|
||||||
|
getpid());
|
||||||
|
buffer = weare;
|
||||||
break;
|
break;
|
||||||
case DOCNUMBER_INTERNAL:
|
case DOCNUMBER_INTERNAL:
|
||||||
logmsg("Bailing out due to internal error");
|
logmsg("Bailing out due to internal error");
|
||||||
|
Loading…
Reference in New Issue
Block a user