← Commit list

026498df43

Viktor Szakats
Viktor Szakats
2025-10-19
SUCCESS Duration: 217s

Subject

mod_curltest: tidy-ups and small fixes

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

tests/http/testenv/mod_curltest/mod_curltest.c+13 -18
@@ -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;
}