aboutsummaryrefslogtreecommitdiff
path: root/tests/http/testenv/mod_curltest/mod_curltest.c
diff options
context:
space:
mode:
authorSadaf Ebrahimi <sadafebrahimi@google.com>2024-02-20 18:53:58 +0000
committerSadaf Ebrahimi <sadafebrahimi@google.com>2024-02-20 18:55:51 +0000
commit94577271ee81d3399bec0328cc6a27688029edec (patch)
tree1b01132e15db02538dcf10922559df5a286d1cd6 /tests/http/testenv/mod_curltest/mod_curltest.c
parent97598f1763810e446ff21ec60fb0b222097b32c6 (diff)
parent5ce164e0e9290c96eb7d502173426c0a135ec008 (diff)
downloadcurl-94577271ee81d3399bec0328cc6a27688029edec.tar.gz
Upgrade curl to curl-8_6_0
This project was upgraded with external_updater. Usage: tools/external_updater/updater.sh update external/curl For more info, check https://cs.android.com/android/platform/superproject/+/main:tools/external_updater/README.md Test: TreeHugger Change-Id: I083147dff18fe11adc3131953c5ad4a3e14433fe
Diffstat (limited to 'tests/http/testenv/mod_curltest/mod_curltest.c')
-rw-r--r--tests/http/testenv/mod_curltest/mod_curltest.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/http/testenv/mod_curltest/mod_curltest.c b/tests/http/testenv/mod_curltest/mod_curltest.c
index 30fb765ae..ff1983d17 100644
--- a/tests/http/testenv/mod_curltest/mod_curltest.c
+++ b/tests/http/testenv/mod_curltest/mod_curltest.c
@@ -423,6 +423,7 @@ static int curltest_put_handler(request_rec *r)
char buffer[16*1024];
const char *ct;
apr_off_t rbody_len = 0;
+ const char *s_rbody_len;
const char *request_id = "none";
apr_time_t chunk_delay = 0;
apr_array_header_t *args = NULL;
@@ -491,7 +492,9 @@ static int curltest_put_handler(request_rec *r)
}
}
/* we are done */
- rv = apr_brigade_printf(bb, NULL, NULL, "%"APR_OFF_T_FMT, rbody_len);
+ s_rbody_len = apr_psprintf(r->pool, "%"APR_OFF_T_FMT, rbody_len);
+ apr_table_setn(r->headers_out, "Received-Length", s_rbody_len);
+ rv = apr_brigade_puts(bb, NULL, NULL, s_rbody_len);
if(APR_SUCCESS != rv) goto cleanup;
b = apr_bucket_eos_create(c->bucket_alloc);
APR_BRIGADE_INSERT_TAIL(bb, b);