diff options
Diffstat (limited to 'src/shrpx_mruby_module_response.cc')
-rw-r--r-- | src/shrpx_mruby_module_response.cc | 10 |
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); |