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
ec79d70b
Commit
ec79d70b
authored
Jul 22, 2013
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Code cleanup
parent
551ae72f
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
3 additions
and
47 deletions
+3
-47
src/nghttp.cc
src/nghttp.cc
+3
-6
src/nghttp2_ssl.cc
src/nghttp2_ssl.cc
+0
-31
src/nghttp2_ssl.h
src/nghttp2_ssl.h
+0
-7
src/nghttpd.cc
src/nghttpd.cc
+0
-3
No files found.
src/nghttp.cc
View file @
ec79d70b
...
...
@@ -586,8 +586,6 @@ struct HttpClient {
}
};
extern
bool
ssl_debug
;
namespace
{
void
submit_request
(
HttpClient
*
client
,
const
std
::
map
<
std
::
string
,
std
::
string
>&
headers
,
...
...
@@ -861,13 +859,13 @@ int client_select_next_proto_cb(SSL* ssl,
const
unsigned
char
*
in
,
unsigned
int
inlen
,
void
*
arg
)
{
if
(
ssl_debug
)
{
if
(
config
.
verbose
)
{
print_timer
();
std
::
cout
<<
" NPN select next protocol: the remote server offers:"
<<
std
::
endl
;
}
for
(
unsigned
int
i
=
0
;
i
<
inlen
;
i
+=
in
[
i
]
+
1
)
{
if
(
ssl_debug
)
{
if
(
config
.
verbose
)
{
std
::
cout
<<
" * "
;
std
::
cout
.
write
(
reinterpret_cast
<
const
char
*>
(
&
in
[
i
+
1
]),
in
[
i
]);
std
::
cout
<<
std
::
endl
;
...
...
@@ -877,7 +875,7 @@ int client_select_next_proto_cb(SSL* ssl,
std
::
cerr
<<
"Server did not advertise HTTP/2.0 protocol."
<<
std
::
endl
;
}
else
{
if
(
ssl_debug
)
{
if
(
config
.
verbose
)
{
std
::
cout
<<
" NPN selected the protocol: "
<<
std
::
string
((
const
char
*
)
*
out
,
(
size_t
)
*
outlen
)
<<
std
::
endl
;
...
...
@@ -1088,7 +1086,6 @@ int run(char **uris, int n)
callbacks
.
on_unknown_frame_recv_callback
=
on_unknown_frame_recv_callback
;
}
callbacks
.
on_data_chunk_recv_callback
=
on_data_chunk_recv_callback
;
ssl_debug
=
config
.
verbose
;
std
::
string
prev_host
;
uint16_t
prev_port
=
0
;
int
failures
=
0
;
...
...
src/nghttp2_ssl.cc
View file @
ec79d70b
...
...
@@ -48,37 +48,6 @@
namespace
nghttp2
{
bool
ssl_debug
=
false
;
int
select_next_proto_cb
(
SSL
*
ssl
,
unsigned
char
**
out
,
unsigned
char
*
outlen
,
const
unsigned
char
*
in
,
unsigned
int
inlen
,
void
*
arg
)
{
if
(
ssl_debug
)
{
print_timer
();
std
::
cout
<<
" NPN select next protocol: the remote server offers:"
<<
std
::
endl
;
}
for
(
unsigned
int
i
=
0
;
i
<
inlen
;
i
+=
in
[
i
]
+
1
)
{
if
(
ssl_debug
)
{
std
::
cout
<<
" * "
;
std
::
cout
.
write
(
reinterpret_cast
<
const
char
*>
(
&
in
[
i
+
1
]),
in
[
i
]);
std
::
cout
<<
std
::
endl
;
}
}
if
(
nghttp2_select_next_protocol
(
out
,
outlen
,
in
,
inlen
)
<=
0
)
{
std
::
cerr
<<
"Server did not advertise HTTP/2.0 protocol."
<<
std
::
endl
;
abort
();
}
if
(
ssl_debug
)
{
std
::
cout
<<
" NPN selected the protocol: "
<<
std
::
string
((
const
char
*
)
*
out
,
(
size_t
)
*
outlen
)
<<
std
::
endl
;
}
return
SSL_TLSEXT_ERR_OK
;
}
namespace
{
const
char
*
strstatus
(
nghttp2_error_code
error_code
)
{
...
...
src/nghttp2_ssl.h
View file @
ec79d70b
...
...
@@ -39,13 +39,6 @@
namespace
nghttp2
{
extern
bool
ssl_debug
;
int
select_next_proto_cb
(
SSL
*
ssl
,
unsigned
char
**
out
,
unsigned
char
*
outlen
,
const
unsigned
char
*
in
,
unsigned
int
inlen
,
void
*
arg
);
void
print_nv
(
char
**
nv
);
void
on_frame_recv_callback
...
...
src/nghttpd.cc
View file @
ec79d70b
...
...
@@ -42,8 +42,6 @@
namespace
nghttp2
{
extern
bool
ssl_debug
;
namespace
{
void
print_usage
(
std
::
ostream
&
out
)
{
...
...
@@ -168,7 +166,6 @@ int main(int argc, char **argv)
SSL_library_init
();
reset_timer
();
config
.
on_request_recv_callback
=
htdocs_on_request_recv_callback
;
ssl_debug
=
config
.
verbose
;
HttpServer
server
(
&
config
);
server
.
run
();
...
...
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