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
325612bc
Commit
325612bc
authored
May 10, 2018
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nghttp: Receive ORIGIN frame
parent
80342215
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
0 deletions
+12
-0
src/app_helper.cc
src/app_helper.cc
+11
-0
src/nghttp.cc
src/nghttp.cc
+1
-0
No files found.
src/app_helper.cc
View file @
325612bc
...
@@ -106,6 +106,8 @@ std::string strframetype(uint8_t type) {
...
@@ -106,6 +106,8 @@ std::string strframetype(uint8_t type) {
return
"WINDOW_UPDATE"
;
return
"WINDOW_UPDATE"
;
case
NGHTTP2_ALTSVC
:
case
NGHTTP2_ALTSVC
:
return
"ALTSVC"
;
return
"ALTSVC"
;
case
NGHTTP2_ORIGIN
:
return
"ORIGIN"
;
}
}
std
::
string
s
=
"extension(0x"
;
std
::
string
s
=
"extension(0x"
;
...
@@ -351,6 +353,15 @@ void print_frame(print_type ptype, const nghttp2_frame *frame) {
...
@@ -351,6 +353,15 @@ void print_frame(print_type ptype, const nghttp2_frame *frame) {
static_cast
<
int
>
(
altsvc
->
field_value_len
),
altsvc
->
field_value
);
static_cast
<
int
>
(
altsvc
->
field_value_len
),
altsvc
->
field_value
);
break
;
break
;
}
}
case
NGHTTP2_ORIGIN
:
{
auto
origin
=
static_cast
<
nghttp2_ext_origin
*>
(
frame
->
ext
.
payload
);
for
(
size_t
i
=
0
;
i
<
origin
->
nov
;
++
i
)
{
auto
ent
=
&
origin
->
ov
[
i
];
print_frame_attr_indent
();
fprintf
(
outfile
,
"[%.*s]
\n
"
,
(
int
)
ent
->
origin_len
,
ent
->
origin
);
}
break
;
}
default:
default:
break
;
break
;
}
}
...
...
src/nghttp.cc
View file @
325612bc
...
@@ -127,6 +127,7 @@ Config::Config()
...
@@ -127,6 +127,7 @@ Config::Config()
nghttp2_option_set_peer_max_concurrent_streams
(
http2_option
,
nghttp2_option_set_peer_max_concurrent_streams
(
http2_option
,
peer_max_concurrent_streams
);
peer_max_concurrent_streams
);
nghttp2_option_set_builtin_recv_extension_type
(
http2_option
,
NGHTTP2_ALTSVC
);
nghttp2_option_set_builtin_recv_extension_type
(
http2_option
,
NGHTTP2_ALTSVC
);
nghttp2_option_set_builtin_recv_extension_type
(
http2_option
,
NGHTTP2_ORIGIN
);
}
}
Config
::~
Config
()
{
nghttp2_option_del
(
http2_option
);
}
Config
::~
Config
()
{
nghttp2_option_del
(
http2_option
);
}
...
...
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