-*- coding: utf-8 -*-
Changes with Apache 2.5.0
+ *) http: Fix LimitRequestBody checks when there is no more bytes to read.
+ [Michael Kaufmann <mail michael-kaufmann.ch>]
+
*) mod_ldap: In some case, LDAP_NO_SUCH_ATTRIBUTE could be returned instead of
an error during a compare operation. [Eric Covener]
apr_bucket *e;
http_ctx_t *ctx = f->ctx;
apr_status_t rv;
- apr_off_t totalread;
int again;
conf = (core_server_config *)
readbytes = ctx->remaining;
}
if (readbytes > 0) {
+ apr_off_t totalread;
rv = ap_get_brigade(f->next, b, mode, block, readbytes);
}
}
+ /* We have a limit in effect. */
+ if (ctx->limit) {
+ /* FIXME: Note that we might get slightly confused on
+ * chunked inputs as we'd need to compensate for the chunk
+ * lengths which may not really count. This seems to be up
+ * for interpretation.
+ */
+ ctx->limit_used += totalread;
+ if (ctx->limit < ctx->limit_used) {
+ ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, f->r,
+ APLOGNO(01591) "Read content length of "
+ "%" APR_OFF_T_FMT " is larger than the "
+ "configured limit of %" APR_OFF_T_FMT,
+ ctx->limit_used, ctx->limit);
+ return APR_ENOSPC;
+ }
+ }
}
/* If we have no more bytes remaining on a C-L request,
ctx->eos_sent = 1;
}
- /* We have a limit in effect. */
- if (ctx->limit) {
- /* FIXME: Note that we might get slightly confused on chunked inputs
- * as we'd need to compensate for the chunk lengths which may not
- * really count. This seems to be up for interpretation. */
- ctx->limit_used += totalread;
- if (ctx->limit < ctx->limit_used) {
- ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, f->r, APLOGNO(01591)
- "Read content-length of %" APR_OFF_T_FMT
- " is larger than the configured limit"
- " of %" APR_OFF_T_FMT, ctx->limit_used, ctx->limit);
- return APR_ENOSPC;
- }
- }
-
break;
}
case BODY_CHUNK_TRAILER: {