summaryrefslogtreecommitdiffhomepage
path: root/src/java
diff options
context:
space:
mode:
authorIppolitov Igor <iippolitov@nginx.com>2023-10-19 12:50:39 +0100
committerIppolitov Igor <iippolitov@nginx.com>2023-10-19 12:50:39 +0100
commitc43629880472bba8d389dfb0b7ae6d883b0ba499 (patch)
treeacecdcb36cfb85fac3d8cdbfbe473c26ac2e2686 /src/java
parent8c4425ccb9a413e8d0506e0254f0e84bd89a32a6 (diff)
parentfb33ec86a3b6ca6a844dfa6980bb9e083094abec (diff)
downloadunit-c43629880472bba8d389dfb0b7ae6d883b0ba499.tar.gz
unit-c43629880472bba8d389dfb0b7ae6d883b0ba499.tar.bz2
Merged with the default branch.1.31.1-1
Diffstat (limited to 'src/java')
-rw-r--r--src/java/nxt_jni_Response.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/java/nxt_jni_Response.c b/src/java/nxt_jni_Response.c
index 2ccfd854..fa698ee8 100644
--- a/src/java/nxt_jni_Response.c
+++ b/src/java/nxt_jni_Response.c
@@ -334,7 +334,8 @@ nxt_java_get_response_info(jlong req_info_ptr, uint32_t extra_fields,
- req->response->fields_count
|| extra_data > (uint32_t) (buf->end - buf->free))
{
- p = buf->start + req->response_max_fields * sizeof(nxt_unit_field_t);
+ p = buf->start + sizeof(nxt_unit_response_t)
+ + req->response_max_fields * sizeof(nxt_unit_field_t);
max_size = 2 * (buf->end - p);
if (max_size > nxt_unit_buf_max()) {
@@ -936,8 +937,8 @@ nxt_java_Response_reset(JNIEnv *env, jclass cls, jlong req_info_ptr)
buf = req->response_buf;
- buf->free = buf->start + req->response_max_fields
- * sizeof(nxt_unit_field_t);
+ buf->free = buf->start + sizeof(nxt_unit_response_t)
+ + req->response_max_fields * sizeof(nxt_unit_field_t);
}
}