You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by yl...@apache.org on 2015/06/17 10:52:10 UTC
svn commit: r1685950 -
/httpd/httpd/branches/2.4.x/modules/http/http_filters.c
Author: ylavic
Date: Wed Jun 17 08:52:10 2015
New Revision: 1685950
URL: http://svn.apache.org/r1685950
Log:
Follow up to r1685904: apply the missing 'parsing' bits.
Modified:
httpd/httpd/branches/2.4.x/modules/http/http_filters.c
Modified: httpd/httpd/branches/2.4.x/modules/http/http_filters.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/http/http_filters.c?rev=1685950&r1=1685949&r2=1685950&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/http/http_filters.c (original)
+++ httpd/httpd/branches/2.4.x/modules/http/http_filters.c Wed Jun 17 08:52:10 2015
@@ -502,21 +502,26 @@ apr_status_t ap_http_filter(ap_filter_t
apr_size_t len;
if (!APR_BUCKET_IS_METADATA(e)) {
+ int parsing = 0;
+
rv = apr_bucket_read(e, &buffer, &len, APR_BLOCK_READ);
+
+ if (rv == APR_SUCCESS) {
+ parsing = 1;
+ rv = parse_chunk_size(ctx, buffer, len,
+ f->r->server->limit_req_fieldsize);
+ }
if (rv != APR_SUCCESS) {
ap_log_rerror(APLOG_MARK, APLOG_INFO, rv, f->r, APLOGNO(01590)
"Error reading/parsing chunk %s ",
(APR_ENOSPC == rv) ? "(overflow)" : "");
- return rv;
- }
-
- rv = parse_chunk_size(ctx, buffer, len,
- f->r->server->limit_req_fieldsize);
- if (rv != APR_SUCCESS) {
- if (rv != APR_ENOSPC) {
- http_error = HTTP_BAD_REQUEST;
+ if (parsing) {
+ if (rv != APR_ENOSPC) {
+ http_error = HTTP_BAD_REQUEST;
+ }
+ return bail_out_on_error(ctx, f, http_error);
}
- return bail_out_on_error(ctx, f, http_error);
+ return rv;
}
}