-*- coding: utf-8 -*-
Changes with Apache 2.2.7
+ *) core: Handle unrecognised transfer-encodings.
+ PR 43882 [Nick Kew, Jeff Trawick]
+
*) mod_include: Add an "if" directive syntax to test whether an URL
is accessible, and if so, conditionally display content. This
allows a webmaster to hide a link to a private page when the user
PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
[ start all new proposals below, under PATCHES PROPOSED. ]
- * http_filters: Fix handling of unrecognised Transfer Encodings
- PR 43882
- http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/http/http_filters.c?r1=592951&r2=599137
- http://svn.apache.org/viewvc/httpd/httpd/trunk/CHANGES?r1=595672&r2=595671&pathrev=595672 (CHANGES)
- +1: niq, rpluem, jim
- niq says: modified in 599059 (following suggestion by trawick)
-
* mod_ssl: Enable to build with OpenSSL 0.9.9
trunk:
http://svn.apache.org/viewvc?view=rev&revision=598019
if (!strcasecmp(tenc, "chunked")) {
ctx->state = BODY_CHUNK;
}
+ /* test lenp, because it gives another case we can handle */
+ else if (!lenp) {
+ /* Something that isn't in HTTP, unless some future
+ * edition defines new transfer ecodings, is unsupported.
+ */
+ apr_bucket_brigade *bb;
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, f->r,
+ "Unknown Transfer-Encoding: %s", tenc);
+ bb = apr_brigade_create(f->r->pool, f->c->bucket_alloc);
+ e = ap_bucket_error_create(HTTP_NOT_IMPLEMENTED, NULL,
+ f->r->pool, f->c->bucket_alloc);
+ APR_BRIGADE_INSERT_TAIL(bb, e);
+ e = apr_bucket_eos_create(f->c->bucket_alloc);
+ APR_BRIGADE_INSERT_TAIL(bb, e);
+ ctx->eos_sent = 1;
+ return ap_pass_brigade(f->r->output_filters, bb);
+ }
+ else {
+ ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, f->r,
+ "Unknown Transfer-Encoding: %s; using Content-Length", tenc);
+ tenc = NULL;
+ }
}
- else if (lenp) {
+ if (lenp && !tenc) {
char *endstr;
ctx->state = BODY_LENGTH;