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
1b63e6d4
Commit
1b63e6d4
authored
Sep 06, 2015
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nghttpx: Call request phase hook for pushed resource as well
parent
28defbfb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
1 deletion
+18
-1
doc/nghttpx.h2r
doc/nghttpx.h2r
+4
-1
src/shrpx_http2_upstream.cc
src/shrpx_http2_upstream.cc
+14
-0
No files found.
doc/nghttpx.h2r
View file @
1b63e6d4
...
...
@@ -289,7 +289,10 @@ and :rb:attr:`Nghttpx::Env#resp` respectively.
method is noop. *uri* can be absolute URI, absolute path or
relative path to the current request. For absolute or
relative path, scheme and authority are inherited from the
current request. Currently, method is always GET.
current request. Currently, method is always GET. nghttpx
will issue request to backend servers to fulfill this request.
The request and response phase hooks will be called for pushed
resource as well.
.. rb:class:: Response
...
...
src/shrpx_http2_upstream.cc
View file @
1b63e6d4
...
...
@@ -587,6 +587,20 @@ int on_frame_send_callback(nghttp2_session *session, const nghttp2_frame *frame,
// downstream is in pending queue.
auto
ptr
=
downstream
.
get
();
upstream
->
add_pending_downstream
(
std
::
move
(
downstream
));
#ifdef HAVE_MRUBY
auto
worker
=
handler
->
get_worker
();
auto
mruby_ctx
=
worker
->
get_mruby_context
();
if
(
mruby_ctx
->
run_on_request_proc
(
ptr
)
!=
0
)
{
if
(
upstream
->
error_reply
(
ptr
,
500
)
!=
0
)
{
upstream
->
rst_stream
(
ptr
,
NGHTTP2_INTERNAL_ERROR
);
return
0
;
}
return
0
;
}
#endif // HAVE_MRUBY
upstream
->
start_downstream
(
ptr
);
return
0
;
...
...
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