Changeset 15679 for platform/apache/mod_checksum_filter
- Timestamp:
- 07/11/08 18:18:40 (5 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
platform/apache/mod_checksum_filter/mod_checksum_filter.c
r13653 r15679 253 253 /* reading stream completed */ 254 254 255 rv = apr_brigade_pflatten(ctx->bb, &content_body, &content_length, r->pool); 256 if (rv != APR_SUCCESS) { 257 ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, 258 "mod_checksum_filter: apr_brigade_pflatten() failed"); 259 return create_error_brigade(f, ctx->bb); 260 } 261 255 262 /* check request env */ 256 263 checksum_request = apr_table_get(r->headers_out, "X-CheckSum-Request"); 257 264 if (!checksum_request) { 258 265 ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, 259 "mod_checksum_filter: not checksum request ");266 "mod_checksum_filter: not checksum request (%dbytes)", content_length); 260 267 return create_error_brigade(f, ctx->bb); 261 268 } … … 275 282 if (apr_strnatcmp(checksum_request, request_sha1) != 0) { 276 283 ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, 277 "mod_checksum_filter: bad checksum request %s != %s ",278 checksum_request, request_sha1 );284 "mod_checksum_filter: bad checksum request %s != %s (%dbytes)", 285 checksum_request, request_sha1, content_length); 279 286 return create_error_brigade(f, ctx->bb); 280 287 } … … 284 291 if (!checksum_response) { 285 292 ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, 286 "mod_checksum_filter: not checksum response ");293 "mod_checksum_filter: not checksum response (%dbytes)", content_length); 287 294 return create_error_brigade(f, ctx->bb); 288 295 } 289 296 apr_table_unset(r->headers_out, "X-CheckSum-Response"); 290 297 291 rv = apr_brigade_pflatten(ctx->bb, &content_body, &content_length, r->pool);292 if (rv != APR_SUCCESS) {293 ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,294 "mod_checksum_filter: apr_brigade_pflatten() failed");295 return create_error_brigade(f, ctx->bb);296 }297 298 apr_sha1_base64(content_body, content_length, response_sha1); 298 299 strip_last_equal(response_sha1); … … 300 301 if (apr_strnatcmp(checksum_response, response_sha1) != 0) { 301 302 ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, 302 "mod_checksum_filter: bad checksum response %s != %s ",303 checksum_response, response_sha1 );303 "mod_checksum_filter: bad checksum response %s != %s (%dbytes)", 304 checksum_response, response_sha1, content_length); 304 305 return create_error_brigade(f, ctx->bb); 305 306 }
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)