diff options
author | Valentin Bartenev <vbart@nginx.com> | 2018-06-25 16:51:47 +0300 |
---|---|---|
committer | Valentin Bartenev <vbart@nginx.com> | 2018-06-25 16:51:47 +0300 |
commit | 1a52d876f7e10d07f58deee6faeaf70a11a6110f (patch) | |
tree | f69ba903180b3deac3bba2ee7acda9d34f18d73c /src/nxt_php_sapi.c | |
parent | af31012815e20f0c92ed6ea803638a16ba47b0c2 (diff) | |
download | unit-1a52d876f7e10d07f58deee6faeaf70a11a6110f.tar.gz unit-1a52d876f7e10d07f58deee6faeaf70a11a6110f.tar.bz2 |
Introduced nxt_length() macro.
Diffstat (limited to 'src/nxt_php_sapi.c')
-rw-r--r-- | src/nxt_php_sapi.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/nxt_php_sapi.c b/src/nxt_php_sapi.c index 5aae2f45..f495364a 100644 --- a/src/nxt_php_sapi.c +++ b/src/nxt_php_sapi.c @@ -635,8 +635,8 @@ nxt_php_send_headers(sapi_headers_struct *sapi_headers TSRMLS_DC) } while(0) if (SG(request_info).no_headers == 1) { - RC(nxt_php_write(ctx, default_repsonse, sizeof(default_repsonse) - 1, - 1, 0)); + RC(nxt_php_write(ctx, default_repsonse, nxt_length(default_repsonse), + 1, 0)); return SAPI_HEADER_SENT_SUCCESSFULLY; } @@ -660,21 +660,21 @@ nxt_php_send_headers(sapi_headers_struct *sapi_headers TSRMLS_DC) RC(nxt_php_write(ctx, buf, len, 0, 0)); } else { - RC(nxt_php_write(ctx, status_200, sizeof(status_200) - 1, 0, 0)); + RC(nxt_php_write(ctx, status_200, nxt_length(status_200), 0, 0)); } - RC(nxt_php_write(ctx, cr_lf, sizeof(cr_lf) - 1, 0, 0)); + RC(nxt_php_write(ctx, cr_lf, nxt_length(cr_lf), 0, 0)); h = zend_llist_get_first_ex(&sapi_headers->headers, &zpos); while (h) { RC(nxt_php_write(ctx, (u_char *) h->header, h->header_len, 0, 0)); - RC(nxt_php_write(ctx, cr_lf, sizeof(cr_lf) - 1, 0, 0)); + RC(nxt_php_write(ctx, cr_lf, nxt_length(cr_lf), 0, 0)); h = zend_llist_get_next_ex(&sapi_headers->headers, &zpos); } - RC(nxt_php_write(ctx, cr_lf, sizeof(cr_lf) - 1, 1, 0)); + RC(nxt_php_write(ctx, cr_lf, nxt_length(cr_lf), 1, 0)); #undef RC |