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
dd415133
Commit
dd415133
authored
Sep 03, 2013
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nghttp: Use before_frame_send_callback to check stream_id
parent
d960cf89
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
src/nghttp.cc
src/nghttp.cc
+8
-1
No files found.
src/nghttp.cc
View file @
dd415133
...
@@ -978,13 +978,19 @@ void check_stream_id(nghttp2_session *session, int32_t stream_id,
...
@@ -978,13 +978,19 @@ void check_stream_id(nghttp2_session *session, int32_t stream_id,
}
}
}
// namespace
}
// namespace
int
on_frame_send_callback2
int
before_frame_send_callback
(
nghttp2_session
*
session
,
const
nghttp2_frame
*
frame
,
void
*
user_data
)
(
nghttp2_session
*
session
,
const
nghttp2_frame
*
frame
,
void
*
user_data
)
{
{
if
(
frame
->
hd
.
type
==
NGHTTP2_HEADERS
&&
if
(
frame
->
hd
.
type
==
NGHTTP2_HEADERS
&&
frame
->
headers
.
cat
==
NGHTTP2_HCAT_REQUEST
)
{
frame
->
headers
.
cat
==
NGHTTP2_HCAT_REQUEST
)
{
check_stream_id
(
session
,
frame
->
hd
.
stream_id
,
user_data
);
check_stream_id
(
session
,
frame
->
hd
.
stream_id
,
user_data
);
}
}
return
0
;
}
int
on_frame_send_callback2
(
nghttp2_session
*
session
,
const
nghttp2_frame
*
frame
,
void
*
user_data
)
{
if
(
config
.
verbose
)
{
if
(
config
.
verbose
)
{
on_frame_send_callback
(
session
,
frame
,
user_data
);
on_frame_send_callback
(
session
,
frame
,
user_data
);
}
}
...
@@ -1341,6 +1347,7 @@ int run(char **uris, int n)
...
@@ -1341,6 +1347,7 @@ int run(char **uris, int n)
callbacks
.
on_stream_close_callback
=
on_stream_close_callback
;
callbacks
.
on_stream_close_callback
=
on_stream_close_callback
;
callbacks
.
on_frame_recv_callback
=
on_frame_recv_callback2
;
callbacks
.
on_frame_recv_callback
=
on_frame_recv_callback2
;
callbacks
.
on_frame_send_callback
=
on_frame_send_callback2
;
callbacks
.
on_frame_send_callback
=
on_frame_send_callback2
;
callbacks
.
before_frame_send_callback
=
before_frame_send_callback
;
if
(
config
.
verbose
)
{
if
(
config
.
verbose
)
{
callbacks
.
on_data_recv_callback
=
on_data_recv_callback
;
callbacks
.
on_data_recv_callback
=
on_data_recv_callback
;
callbacks
.
on_data_send_callback
=
on_data_send_callback
;
callbacks
.
on_data_send_callback
=
on_data_send_callback
;
...
...
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