in bug #53661 Jeff Lawson proposed to eliminate any restriction on the
Content-Type and process any request
The code concerned (from src/apache-2/apache_request)
if (r->method_number == M_POST ||
r->method_number == M_PUT ||
r->method_number == M_DELETE) {
const char *ct = apr_table_get(r->headers_in, "Content-type");
if (ct) ap_log_rerror(REQ_INFO, "content-type: `%s'", ct);
if (ct && strncaseEQ(ct, DEFAULT_ENCTYPE,
DEFAULT_ENCTYPE_LENGTH)) {
result = ApacheRequest_parse_urlencoded(req);
} else if (ct && strncaseEQ(ct, TEXT_XML_ENCTYPE,
TEXT_XML_ENCTYPE_LENGTH)) {
result = ApacheRequest_parse_urlencoded(req);
} else if (ct && strncaseEQ(ct, MULTIPART_ENCTYPE,
MULTIPART_ENCTYPE_LENGTH)) {
result = ApacheRequest_parse_multipart(req,ct);
} else {
ap_log_rerror(REQ_ERROR, "unknown content-type: `%s'", ct);
result = HTTP_INTERNAL_SERVER_ERROR;
}
}
else {
result = ApacheRequest_parse_urlencoded(req);
}
to my understanding Jeff's idea is that ApacheRequest_parse_urlencoded
should be called in any case, excluding the multipart message case. The
programmer should be able to understand the content-type field value
from the array storing the header lines. Thoughts?
-- Massimo
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]