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
6ad629de
Unverified
Commit
6ad629de
authored
Jan 04, 2018
by
Tatsuhiro Tsujikawa
Committed by
GitHub
Jan 04, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1102 from nghttp2/fix-missing-alpn-validation
nghttpx: Fix missing ALPN validation (--npn-list)
parents
a776b0db
74754982
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
18 deletions
+10
-18
src/shrpx_client_handler.cc
src/shrpx_client_handler.cc
+10
-18
No files found.
src/shrpx_client_handler.cc
View file @
6ad629de
...
...
@@ -556,28 +556,20 @@ int ClientHandler::validate_next_proto() {
}
#endif // OPENSSL_VERSION_NUMBER >= 0x10002000L
if
(
next_proto
==
nullptr
)
{
if
(
LOG_ENABLED
(
INFO
))
{
CLOG
(
INFO
,
this
)
<<
"No protocol negotiated. Fallback to HTTP/1.1"
;
}
StringRef
proto
;
upstream_
=
make_unique
<
HttpsUpstream
>
(
this
);
alpn_
=
StringRef
::
from_lit
(
"http/1.1"
)
;
if
(
next_proto
)
{
proto
=
StringRef
{
next_proto
,
next_proto_len
}
;
// At this point, input buffer is already filled with some bytes.
// The read callback is not called until new data come. So consume
// input buffer here.
if
(
on_read
()
!=
0
)
{
return
-
1
;
if
(
LOG_ENABLED
(
INFO
))
{
CLOG
(
INFO
,
this
)
<<
"The negotiated next protocol: "
<<
proto
;
}
}
else
{
if
(
LOG_ENABLED
(
INFO
))
{
CLOG
(
INFO
,
this
)
<<
"No protocol negotiated. Fallback to HTTP/1.1"
;
}
return
0
;
}
auto
proto
=
StringRef
{
next_proto
,
next_proto_len
};
if
(
LOG_ENABLED
(
INFO
))
{
CLOG
(
INFO
,
this
)
<<
"The negotiated next protocol: "
<<
proto
;
proto
=
StringRef
::
from_lit
(
"http/1.1"
);
}
if
(
!
tls
::
in_proto_list
(
get_config
()
->
tls
.
npn_list
,
proto
))
{
...
...
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