Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
nghttp2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
nghttp2
Commits
21a3edfc
Commit
21a3edfc
authored
Sep 07, 2015
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nghttpx: Use 's' for param of Response::return
parent
39287314
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
src/shrpx_mruby_module_response.cc
src/shrpx_mruby_module_response.cc
+6
-5
No files found.
src/shrpx_mruby_module_response.cc
View file @
21a3edfc
...
...
@@ -180,8 +180,9 @@ mrb_value response_return(mrb_state *mrb, mrb_value self) {
mrb_raise
(
mrb
,
E_RUNTIME_ERROR
,
"response has already been committed"
);
}
mrb_value
val
;
mrb_get_args
(
mrb
,
"|o"
,
&
val
);
const
char
*
val
;
mrb_int
vallen
;
mrb_get_args
(
mrb
,
"|s"
,
&
val
,
&
vallen
);
const
uint8_t
*
body
=
nullptr
;
size_t
bodylen
=
0
;
...
...
@@ -195,9 +196,9 @@ mrb_value response_return(mrb_state *mrb, mrb_value self) {
data
->
response_headers_dirty
=
false
;
}
if
(
downstream
->
expect_response_body
()
&&
!
mrb_nil_p
(
val
)
)
{
body
=
reinterpret_cast
<
const
uint8_t
*>
(
RSTRING_PTR
(
val
)
);
bodylen
=
RSTRING_LEN
(
val
)
;
if
(
downstream
->
expect_response_body
()
&&
vallen
>
0
)
{
body
=
reinterpret_cast
<
const
uint8_t
*>
(
val
);
bodylen
=
vallen
;
}
auto
cl
=
downstream
->
get_response_header
(
http2
::
HD_CONTENT_LENGTH
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment