summaryrefslogtreecommitdiffstats
path: root/src/shrpx_mruby_module_response.cc
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-11 16:46:30 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-11 16:46:30 +0000
commit8e1187a02b785e56d798660a9a292ca385e1f6aa (patch)
treeb035593aa2ae37c25aeb28b537a3223c52532ab1 /src/shrpx_mruby_module_response.cc
parentAdding upstream version 1.61.0. (diff)
downloadnghttp2-upstream.tar.xz
nghttp2-upstream.zip
Adding upstream version 1.62.1.upstream/1.62.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/shrpx_mruby_module_response.cc')
-rw-r--r--src/shrpx_mruby_module_response.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/shrpx_mruby_module_response.cc b/src/shrpx_mruby_module_response.cc
index 1de1d5f..5d02d83 100644
--- a/src/shrpx_mruby_module_response.cc
+++ b/src/shrpx_mruby_module_response.cc
@@ -127,7 +127,7 @@ mrb_value response_mod_header(mrb_state *mrb, mrb_value self, bool repl) {
mrb_gc_arena_restore(mrb, ai);
- auto token = http2::lookup_token(keyref.byte(), keyref.size());
+ auto token = http2::lookup_token(keyref);
if (repl) {
size_t p = 0;
@@ -245,8 +245,8 @@ mrb_value response_return(mrb_state *mrb, mrb_value self) {
if (cl) {
cl->value = content_length;
} else {
- resp.fs.add_header_token(StringRef::from_lit("content-length"),
- content_length, false, http2::HD_CONTENT_LENGTH);
+ resp.fs.add_header_token("content-length"_sr, content_length, false,
+ http2::HD_CONTENT_LENGTH);
}
resp.fs.content_length = vallen;
@@ -256,7 +256,7 @@ mrb_value response_return(mrb_state *mrb, mrb_value self) {
if (!date) {
auto lgconf = log_config();
lgconf->update_tstamp(std::chrono::system_clock::now());
- resp.fs.add_header_token(StringRef::from_lit("date"),
+ resp.fs.add_header_token("date"_sr,
make_string_ref(balloc, lgconf->tstamp->time_http),
false, http2::HD_DATE);
}
@@ -319,7 +319,7 @@ mrb_value response_send_info(mrb_state *mrb, mrb_value self) {
mrb_gc_arena_restore(mrb, ai);
- auto token = http2::lookup_token(keyref.byte(), keyref.size());
+ auto token = http2::lookup_token(keyref);
if (mrb_array_p(values)) {
auto n = RARRAY_LEN(values);