Changeset 15679 for platform/apache

Show
Ignore:
Timestamp:
07/11/08 18:18:40 (6 years ago)
Author:
yappo
Message:

app server から受け取ったコンテンツbodyのサイズをerror_logに吐き出す

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • platform/apache/mod_checksum_filter/mod_checksum_filter.c

    r13653 r15679  
    253253    /* reading stream completed */ 
    254254 
     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 
    255262    /* check request env */ 
    256263    checksum_request = apr_table_get(r->headers_out, "X-CheckSum-Request"); 
    257264    if (!checksum_request) { 
    258265        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); 
    260267        return create_error_brigade(f, ctx->bb); 
    261268    } 
     
    275282    if (apr_strnatcmp(checksum_request, request_sha1) != 0) { 
    276283        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); 
    279286        return create_error_brigade(f, ctx->bb); 
    280287    } 
     
    284291    if (!checksum_response) { 
    285292        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); 
    287294        return create_error_brigade(f, ctx->bb); 
    288295    } 
    289296    apr_table_unset(r->headers_out, "X-CheckSum-Response"); 
    290297 
    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     } 
    297298    apr_sha1_base64(content_body, content_length, response_sha1); 
    298299    strip_last_equal(response_sha1); 
     
    300301    if (apr_strnatcmp(checksum_response, response_sha1) != 0) { 
    301302        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); 
    304305        return create_error_brigade(f, ctx->bb); 
    305306    }