summaryrefslogtreecommitdiff
path: root/src/mod_setenv.c
diff options
context:
space:
mode:
authorGlenn Strauss <gstrauss@gluelogic.com>2019-10-13 03:37:59 -0400
committerGlenn Strauss <gstrauss@gluelogic.com>2020-02-24 11:15:32 -0500
commitad9b7e009bb406042fdac5576b1970e891c08d35 (patch)
treebbdc4f6098daa4f307b82e227b458284b4c5886c /src/mod_setenv.c
parentcff64cf17011bb3ad5b05952f75238aa4a5b4498 (diff)
downloadlighttpd-git-ad9b7e009bb406042fdac5576b1970e891c08d35.tar.gz
[core] inline buffer as part of DATA_UNSET key
(instead of key being (buffer *))
Diffstat (limited to 'src/mod_setenv.c')
-rw-r--r--src/mod_setenv.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/mod_setenv.c b/src/mod_setenv.c
index b3832ec2..deb0849a 100644
--- a/src/mod_setenv.c
+++ b/src/mod_setenv.c
@@ -220,16 +220,16 @@ URIHANDLER_FUNC(mod_setenv_uri_handler) {
for (k = 0; k < p->conf.request_header->used; k++) {
data_string *ds = (data_string *)p->conf.request_header->data[k];
- enum http_header_e id = http_header_hkey_get(CONST_BUF_LEN(ds->key));
- http_header_request_append(con, id, CONST_BUF_LEN(ds->key), CONST_BUF_LEN(ds->value));
+ enum http_header_e id = http_header_hkey_get(CONST_BUF_LEN(&ds->key));
+ http_header_request_append(con, id, CONST_BUF_LEN(&ds->key), CONST_BUF_LEN(ds->value));
}
for (k = 0; k < hctx->conf.set_request_header->used; ++k) {
data_string *ds = (data_string *)hctx->conf.set_request_header->data[k];
- enum http_header_e id = http_header_hkey_get(CONST_BUF_LEN(ds->key));
+ enum http_header_e id = http_header_hkey_get(CONST_BUF_LEN(&ds->key));
!buffer_string_is_empty(ds->value)
- ? http_header_request_set(con, id, CONST_BUF_LEN(ds->key), CONST_BUF_LEN(ds->value))
- : http_header_request_unset(con, id, CONST_BUF_LEN(ds->key));
+ ? http_header_request_set(con, id, CONST_BUF_LEN(&ds->key), CONST_BUF_LEN(ds->value))
+ : http_header_request_unset(con, id, CONST_BUF_LEN(&ds->key));
}
return HANDLER_GO_ON;
@@ -245,12 +245,12 @@ CONNECTION_FUNC(mod_setenv_handle_request_env) {
for (size_t k = 0; k < hctx->conf.environment->used; ++k) {
data_string *ds = (data_string *)hctx->conf.environment->data[k];
- http_header_env_append(con, CONST_BUF_LEN(ds->key), CONST_BUF_LEN(ds->value));
+ http_header_env_append(con, CONST_BUF_LEN(&ds->key), CONST_BUF_LEN(ds->value));
}
for (size_t k = 0; k < hctx->conf.set_environment->used; ++k) {
data_string *ds = (data_string *)hctx->conf.set_environment->data[k];
- http_header_env_set(con, CONST_BUF_LEN(ds->key), CONST_BUF_LEN(ds->value));
+ http_header_env_set(con, CONST_BUF_LEN(&ds->key), CONST_BUF_LEN(ds->value));
}
return HANDLER_GO_ON;
@@ -264,16 +264,16 @@ CONNECTION_FUNC(mod_setenv_handle_response_start) {
for (size_t k = 0; k < hctx->conf.response_header->used; ++k) {
data_string *ds = (data_string *)hctx->conf.response_header->data[k];
- enum http_header_e id = http_header_hkey_get(CONST_BUF_LEN(ds->key));
- http_header_response_insert(con, id, CONST_BUF_LEN(ds->key), CONST_BUF_LEN(ds->value));
+ enum http_header_e id = http_header_hkey_get(CONST_BUF_LEN(&ds->key));
+ http_header_response_insert(con, id, CONST_BUF_LEN(&ds->key), CONST_BUF_LEN(ds->value));
}
for (size_t k = 0; k < hctx->conf.set_response_header->used; ++k) {
data_string *ds = (data_string *)hctx->conf.set_response_header->data[k];
- enum http_header_e id = http_header_hkey_get(CONST_BUF_LEN(ds->key));
+ enum http_header_e id = http_header_hkey_get(CONST_BUF_LEN(&ds->key));
!buffer_string_is_empty(ds->value)
- ? http_header_response_set(con, id, CONST_BUF_LEN(ds->key), CONST_BUF_LEN(ds->value))
- : http_header_response_unset(con, id, CONST_BUF_LEN(ds->key));
+ ? http_header_response_set(con, id, CONST_BUF_LEN(&ds->key), CONST_BUF_LEN(ds->value))
+ : http_header_response_unset(con, id, CONST_BUF_LEN(&ds->key));
}
return HANDLER_GO_ON;