mod_curltest: tidy-ups and small fixes
No binary (build failed)
—
(log yok)
| @@ -610,7 +610,7 @@ static int curltest_put_handler(request_rec *r) | |
| } | |
| } | |
| else if(!strcmp("max_upload", arg)) { | |
| - | rbody_max_len = (int)apr_atoi64(val); |
| + | rbody_max_len = (apr_off_t)apr_atoi64(val); |
| continue; | |
| } | |
| } | |
| @@ -629,6 +629,7 @@ static int curltest_put_handler(request_rec *r) | |
| apr_table_unset(r->headers_out, "Content-Length"); | |
| /* Discourage content-encodings */ | |
| apr_table_unset(r->headers_out, "Content-Encoding"); | |
| + | apr_table_setn(r->headers_out, "request-id", request_id); |
| apr_table_setn(r->subprocess_env, "no-brotli", "1"); | |
| apr_table_setn(r->subprocess_env, "no-gzip", "1"); | |
| @@ -674,9 +675,9 @@ static int curltest_put_handler(request_rec *r) | |
| } | |
| cleanup: | |
| - | if(rv == APR_SUCCESS |
| - | || r->status != HTTP_OK |
| - | || c->aborted) { |
| + | if(rv == APR_SUCCESS || |
| + | r->status != HTTP_OK || |
| + | c->aborted) { |
| ap_log_rerror(APLOG_MARK, APLOG_TRACE1, rv, r, "put_handler: done"); | |
| return OK; | |
| } | |
| @@ -694,13 +695,7 @@ static int curltest_1_1_required(request_rec *r) | |
| apr_bucket_brigade *bb; | |
| apr_bucket *b; | |
| apr_status_t rv; | |
| - | char buffer[16*1024]; |
| const char *ct; | |
| - | const char *request_id = "none"; |
| - | apr_time_t chunk_delay = 0; |
| - | apr_array_header_t *args = NULL; |
| - | long l; |
| - | int i; |
| if(strcmp(r->handler, "curltest-1_1-required")) { | |
| return DECLINED; | |
| @@ -744,9 +739,9 @@ static int curltest_1_1_required(request_rec *r) | |
| rv = ap_pass_brigade(r->output_filters, bb); | |
| cleanup: | |
| - | if(rv == APR_SUCCESS |
| - | || r->status != HTTP_OK |
| - | || c->aborted) { |
| + | if(rv == APR_SUCCESS || |
| + | r->status != HTTP_OK || |
| + | c->aborted) { |
| ap_log_rerror(APLOG_MARK, APLOG_TRACE1, rv, r, "1_1_handler: done"); | |
| return OK; | |
| } | |
| @@ -774,10 +769,8 @@ static int curltest_sslinfo_handler(request_rec *r) | |
| apr_bucket_brigade *bb; | |
| apr_bucket *b; | |
| apr_status_t rv; | |
| - | apr_array_header_t *args = NULL; |
| const char *request_id = NULL; | |
| int close_conn = 0; | |
| - | long l; |
| int i; | |
| if(strcmp(r->handler, "curltest-sslinfo")) { | |
| @@ -821,6 +814,8 @@ static int curltest_sslinfo_handler(request_rec *r) | |
| apr_table_unset(r->headers_out, "Content-Length"); | |
| /* Discourage content-encodings */ | |
| apr_table_unset(r->headers_out, "Content-Encoding"); | |
| + | if(request_id) |
| + | apr_table_setn(r->headers_out, "request-id", request_id); |
| apr_table_setn(r->subprocess_env, "no-brotli", "1"); | |
| apr_table_setn(r->subprocess_env, "no-gzip", "1"); | |
| @@ -856,9 +851,9 @@ static int curltest_sslinfo_handler(request_rec *r) | |
| cleanup: | |
| if(close_conn) | |
| r->connection->keepalive = AP_CONN_CLOSE; | |
| - | if(rv == APR_SUCCESS |
| - | || r->status != HTTP_OK |
| - | || c->aborted) { |
| + | if(rv == APR_SUCCESS || |
| + | r->status != HTTP_OK || |
| + | c->aborted) { |
| ap_log_rerror(APLOG_MARK, APLOG_TRACE1, rv, r, "1_1_handler: done"); | |
| return OK; | |
| } | |