summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_http.h
diff options
context:
space:
mode:
authorValentin Bartenev <vbart@nginx.com>2018-06-25 16:51:47 +0300
committerValentin Bartenev <vbart@nginx.com>2018-06-25 16:51:47 +0300
commit1a52d876f7e10d07f58deee6faeaf70a11a6110f (patch)
treef69ba903180b3deac3bba2ee7acda9d34f18d73c /src/nxt_http.h
parentaf31012815e20f0c92ed6ea803638a16ba47b0c2 (diff)
downloadunit-1a52d876f7e10d07f58deee6faeaf70a11a6110f.tar.gz
unit-1a52d876f7e10d07f58deee6faeaf70a11a6110f.tar.bz2
Introduced nxt_length() macro.
Diffstat (limited to 'src/nxt_http.h')
-rw-r--r--src/nxt_http.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nxt_http.h b/src/nxt_http.h
index 57c624d7..c6756ec5 100644
--- a/src/nxt_http.h
+++ b/src/nxt_http.h
@@ -76,15 +76,15 @@ typedef union {
#define nxt_http_field_name_set(_field, _name) \
do { \
- (_field)->name_length = sizeof(_name) - 1; \
+ (_field)->name_length = nxt_length(_name); \
(_field)->name = (u_char *) _name; \
} while (0)
#define nxt_http_field_set(_field, _name, _value) \
do { \
- (_field)->name_length = sizeof(_name) - 1; \
- (_field)->value_length = sizeof(_value) - 1; \
+ (_field)->name_length = nxt_length(_name); \
+ (_field)->value_length = nxt_length(_value); \
(_field)->name = (u_char *) _name; \
(_field)->value = (u_char *) _value; \
} while (0)