Roxen.git/
server/
plugins/
protocols/
ftp.pike
Branch:
Tag:
Non-build tags
All tags
No tags
2004-05-17
2004-05-17 13:20:42 by Martin Nilsson <mani@lysator.liu.se>
64914499e1b1e077dab8ef2e3c014567b27ee7d3 (
14
lines) (+
9
/-
5
)
[
Show
|
Annotate
]
Branch:
Aphoto_2.0_beta3
WebServer sync.
[2.92]
Rev: server/plugins/protocols/ftp.pike:2.94
4:
/* * FTP protocol mk 2 *
-
* $Id: ftp.pike,v 2.
93
2004/05/17 13:20:
05
mani Exp $
+
* $Id: ftp.pike,v 2.
94
2004/05/17 13:20:
42
mani Exp $
* * Henrik Grubbström <grubba@roxen.com> */
437:
class PutFileWrapper { static int response_code = 226;
-
static string response = "Stored.";
+
static
array(
string
)
response =
({
"Stored."
})
;
static string gotdata = ""; static int closed, recvd; static function other_read_callback;
469:
DWRITE("FTP: PUT: close()\n"); ftpsession->touch_me(); if(how != "w" && !closed) {
-
ftpsession->send(response_code,
({
response
}
)
)
;
+
ftpsession->send(response_code, response);
closed = 1; session->conf->received += recvd; session->file->len = recvd;
552:
else code = 550; response_code = code;
-
response =
msg
;
+
response =
({msg})
;
} gotdata = gotdata[n+1..]; }
568:
} // Cut away the code.
-
response =
((
result->rettext
||
errors
[result->error]
)/"
")[1..]
*
"
";
+
if (result->rettext)
+
response = result->rettext
/
"\n";
+
else
+
response = ({errors
[result->error]
||
""
})
;
gotdata = result->data || ""; close();