Roxen.git/
server/
protocols/
http.pike
Branch:
Tag:
Non-build tags
All tags
No tags
2002-02-14
2002-02-14 10:01:25 by Henrik Grubbström (Grubba) <grubba@grubba.org>
d0739e79076e6ac9c33eac36090856ff67c11d33 (
36
lines) (+
25
/-
11
)
[
Show
|
Annotate
]
Branch:
5.2
Improved diagnostics for bad multipart/form-data.
Rev: server/protocols/http.pike:1.359
2:
// Modified by Francesco Chemolli to add throttling capabilities. // Copyright © 1996 - 2001, Roxen IS.
-
constant cvs_version = "$Id: http.pike,v 1.
358
2002/02/
06
17
:
59
:
33
mast
Exp $";
+
constant cvs_version = "$Id: http.pike,v 1.
359
2002/02/
14
10
:
01
:
25
grubba
Exp $";
// #define REQUEST_DEBUG #define MAGIC_ERROR
903:
break; case "multipart/form-data":
-
object messg = MIME.Message(data,
misc
);
+
object messg = MIME.Message(data,
request_headers
);
+
if (!messg->body_parts) {
+
report_error("HTTP: Bad multipart/form-data.\n"
+
" headers:\n"
+
"%{ %O:%O\n%}"
+
" data:\n"
+
"%{ %O\"\\n\"\n%}",
+
(array)request_headers,
+
data/"\n");
+
/* FIXME: Should this be reported to the client? */
+
} else {
foreach(messg->body_parts, object part) { if(part->disp_params->filename)
915:
} else real_variables[part->disp_params->name] += ({part->getdata()}); }
+
}
break; } }
1929:
// array ccd = ({}); void got_data(mixed fooid, string s) {
+
REQUEST_WERR(sprintf("HTTP: Got %O\n", s));
+
if(wanted_data) { data += s;