Skip to content

Commit 843d606

Browse files
committed
update version; refactoring
1 parent 05c997c commit 843d606

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

src/ngx_http_tnt_handlers.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -390,6 +390,8 @@ ngx_http_tnt_get_request_data(ngx_http_request_t *r,
390390
ngx_list_part_t *part;
391391
ngx_table_elt_t *h;
392392
ngx_buf_t *b;
393+
ngx_chain_t *body;
394+
char *p;
393395

394396
root_items = 0;
395397
root_map_place = tp->p;
@@ -507,8 +509,10 @@ ngx_http_tnt_get_request_data(ngx_http_request_t *r,
507509

508510
/* Encode body
509511
*/
512+
510513
if ((tlcf->pass_http_request & NGX_TNT_CONF_PASS_BODY) &&
511-
r->headers_in.content_length_n > 0)
514+
r->headers_in.content_length_n > 0 &&
515+
r->upstream->request_bufs )
512516
{
513517
++root_items;
514518

@@ -521,9 +525,7 @@ ngx_http_tnt_get_request_data(ngx_http_request_t *r,
521525
return NGX_ERROR;
522526
}
523527

524-
525-
ngx_chain_t *body;
526-
char *p = mp_encode_strl(tp->p, r->headers_in.content_length_n);
528+
p = mp_encode_strl(tp->p, r->headers_in.content_length_n);
527529
for (body = r->upstream->request_bufs; body; body = body->next) {
528530

529531
b = body->buf;

src/ngx_http_tnt_version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,6 @@
3333
#ifndef NGX_HTTP_TNT_VERSION_H
3434
#define NGX_HTTP_TNT_VERSION_H 1
3535

36-
#define NGX_HTTP_TNT_MODULE_VERSION_STRING "v2.3.2-dirty"
36+
#define NGX_HTTP_TNT_MODULE_VERSION_STRING "v2.3.2"
3737

3838
#endif

0 commit comments

Comments
 (0)