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
2ae1da11
Commit
2ae1da11
authored
May 14, 2014
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
src: Use C++ style comments for C++ source code
parent
5b4f02df
Changes
15
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
59 additions
and
59 deletions
+59
-59
src/HttpServer.cc
src/HttpServer.cc
+1
-1
src/comp_helper.h
src/comp_helper.h
+2
-2
src/deflatehd.cc
src/deflatehd.cc
+8
-8
src/h2load.cc
src/h2load.cc
+2
-2
src/inflatehd.cc
src/inflatehd.cc
+2
-2
src/nghttp.cc
src/nghttp.cc
+8
-8
src/nghttpd.cc
src/nghttpd.cc
+2
-2
src/shrpx-unittest.cc
src/shrpx-unittest.cc
+5
-5
src/shrpx.cc
src/shrpx.cc
+2
-2
src/shrpx_config_test.h
src/shrpx_config_test.h
+1
-1
src/shrpx_http2_session.cc
src/shrpx_http2_session.cc
+8
-8
src/shrpx_http_downstream_connection.cc
src/shrpx_http_downstream_connection.cc
+8
-8
src/shrpx_https_upstream.cc
src/shrpx_https_upstream.cc
+8
-8
src/shrpx_ssl.cc
src/shrpx_ssl.cc
+1
-1
src/shrpx_ssl_test.h
src/shrpx_ssl_test.h
+1
-1
No files found.
src/HttpServer.cc
View file @
2ae1da11
...
@@ -1725,7 +1725,7 @@ int HttpServer::run()
...
@@ -1725,7 +1725,7 @@ int HttpServer::run()
EC_KEY_free
(
ecdh
);
EC_KEY_free
(
ecdh
);
#endif // OPENSSL_VERSION_NUBMER < 0x10002000L
#endif // OPENSSL_VERSION_NUBMER < 0x10002000L
#endif
/
* OPENSSL_NO_EC */
#endif /
/ OPENSSL_NO_EC
if
(
SSL_CTX_use_PrivateKey_file
(
ssl_ctx
,
if
(
SSL_CTX_use_PrivateKey_file
(
ssl_ctx
,
config_
->
private_key_file
.
c_str
(),
config_
->
private_key_file
.
c_str
(),
...
...
src/comp_helper.h
View file @
2ae1da11
...
@@ -27,7 +27,7 @@
...
@@ -27,7 +27,7 @@
#ifdef HAVE_CONFIG_H
#ifdef HAVE_CONFIG_H
# include <config.h>
# include <config.h>
#endif
/
* HAVE_CONFIG_H */
#endif /
/ HAVE_CONFIG_H
#include <jansson.h>
#include <jansson.h>
...
@@ -44,4 +44,4 @@ void output_json_header(void);
...
@@ -44,4 +44,4 @@ void output_json_header(void);
void
output_json_footer
(
void
);
void
output_json_footer
(
void
);
#endif
/
* NGHTTP2_COMP_HELPER_H */
#endif /
/ NGHTTP2_COMP_HELPER_H
src/deflatehd.cc
View file @
2ae1da11
...
@@ -24,7 +24,7 @@
...
@@ -24,7 +24,7 @@
*/
*/
#ifdef HAVE_CONFIG_H
#ifdef HAVE_CONFIG_H
# include <config.h>
# include <config.h>
#endif
/
* HAVE_CONFIG_H */
#endif /
/ HAVE_CONFIG_H
#include <unistd.h>
#include <unistd.h>
#include <getopt.h>
#include <getopt.h>
...
@@ -108,7 +108,7 @@ static void output_to_json(nghttp2_hd_deflater *deflater,
...
@@ -108,7 +108,7 @@ static void output_to_json(nghttp2_hd_deflater *deflater,
}
}
json_object_set_new
(
obj
,
"headers"
,
dump_headers
(
nva
.
data
(),
nva
.
size
()));
json_object_set_new
(
obj
,
"headers"
,
dump_headers
(
nva
.
data
(),
nva
.
size
()));
if
(
seq
==
0
)
{
if
(
seq
==
0
)
{
/
* We only change the header table size only once at the beginning */
/
/ We only change the header table size only once at the beginning
json_object_set_new
(
obj
,
"header_table_size"
,
json_object_set_new
(
obj
,
"header_table_size"
,
json_integer
(
config
.
table_size
));
json_integer
(
config
.
table_size
));
}
}
...
@@ -293,7 +293,7 @@ static int perform_from_http1text(void)
...
@@ -293,7 +293,7 @@ static int perform_from_http1text(void)
for
(
val_end
=
val
;
*
val_end
&&
(
*
val_end
!=
'\r'
&&
*
val_end
!=
'\n'
);
for
(
val_end
=
val
;
*
val_end
&&
(
*
val_end
!=
'\r'
&&
*
val_end
!=
'\n'
);
++
val_end
);
++
val_end
);
*
val_end
=
'\0'
;
*
val_end
=
'\0'
;
/* printf("[%s] : [%s]\n", line, val); */
nv
->
namelen
=
strlen
(
line
);
nv
->
namelen
=
strlen
(
line
);
nv
->
valuelen
=
strlen
(
val
);
nv
->
valuelen
=
strlen
(
val
);
nv
->
name
=
(
uint8_t
*
)
strdup
(
line
);
nv
->
name
=
(
uint8_t
*
)
strdup
(
line
);
...
@@ -423,11 +423,11 @@ int main(int argc, char **argv)
...
@@ -423,11 +423,11 @@ int main(int argc, char **argv)
print_help
();
print_help
();
exit
(
EXIT_SUCCESS
);
exit
(
EXIT_SUCCESS
);
case
't'
:
case
't'
:
/
* --http1text */
/
/ --http1text
config
.
http1text
=
1
;
config
.
http1text
=
1
;
break
;
break
;
case
's'
:
case
's'
:
/
* --table-size */
/
/ --table-size
errno
=
0
;
errno
=
0
;
config
.
table_size
=
strtoul
(
optarg
,
&
end
,
10
);
config
.
table_size
=
strtoul
(
optarg
,
&
end
,
10
);
if
(
errno
==
ERANGE
||
*
end
!=
'\0'
)
{
if
(
errno
==
ERANGE
||
*
end
!=
'\0'
)
{
...
@@ -436,7 +436,7 @@ int main(int argc, char **argv)
...
@@ -436,7 +436,7 @@ int main(int argc, char **argv)
}
}
break
;
break
;
case
'S'
:
case
'S'
:
/
* --deflate-table-size */
/
/ --deflate-table-size
errno
=
0
;
errno
=
0
;
config
.
deflate_table_size
=
strtoul
(
optarg
,
&
end
,
10
);
config
.
deflate_table_size
=
strtoul
(
optarg
,
&
end
,
10
);
if
(
errno
==
ERANGE
||
*
end
!=
'\0'
)
{
if
(
errno
==
ERANGE
||
*
end
!=
'\0'
)
{
...
@@ -445,11 +445,11 @@ int main(int argc, char **argv)
...
@@ -445,11 +445,11 @@ int main(int argc, char **argv)
}
}
break
;
break
;
case
'd'
:
case
'd'
:
/
* --dump-header-table */
/
/ --dump-header-table
config
.
dump_header_table
=
1
;
config
.
dump_header_table
=
1
;
break
;
break
;
case
'c'
:
case
'c'
:
/
* --no-refset */
/
/ --no-refset
config
.
no_refset
=
1
;
config
.
no_refset
=
1
;
break
;
break
;
case
'?'
:
case
'?'
:
...
...
src/h2load.cc
View file @
2ae1da11
...
@@ -671,7 +671,7 @@ int main(int argc, char **argv)
...
@@ -671,7 +671,7 @@ int main(int argc, char **argv)
"no threads created."
<<
std
::
endl
;
"no threads created."
<<
std
::
endl
;
#else
#else
config
.
nthreads
=
strtoul
(
optarg
,
nullptr
,
10
);
config
.
nthreads
=
strtoul
(
optarg
,
nullptr
,
10
);
#endif
/
* NOTHREADS */
#endif /
/ NOTHREADS
break
;
break
;
case
'm'
:
case
'm'
:
if
(
util
::
strieq
(
"auto"
,
optarg
))
{
if
(
util
::
strieq
(
"auto"
,
optarg
))
{
...
@@ -783,7 +783,7 @@ int main(int argc, char **argv)
...
@@ -783,7 +783,7 @@ int main(int argc, char **argv)
#ifndef NOTHREADS
#ifndef NOTHREADS
ssl
::
LibsslGlobalLock
();
ssl
::
LibsslGlobalLock
();
#endif
/
* NOTHREADS */
#endif /
/ NOTHREADS
auto
ssl_ctx
=
SSL_CTX_new
(
SSLv23_client_method
());
auto
ssl_ctx
=
SSL_CTX_new
(
SSLv23_client_method
());
if
(
!
ssl_ctx
)
{
if
(
!
ssl_ctx
)
{
...
...
src/inflatehd.cc
View file @
2ae1da11
...
@@ -24,7 +24,7 @@
...
@@ -24,7 +24,7 @@
*/
*/
#ifdef HAVE_CONFIG_H
#ifdef HAVE_CONFIG_H
# include <config.h>
# include <config.h>
#endif
/
* HAVE_CONFIG_H */
#endif /
/ HAVE_CONFIG_H
#include <unistd.h>
#include <unistd.h>
#include <getopt.h>
#include <getopt.h>
...
@@ -271,7 +271,7 @@ int main(int argc, char **argv)
...
@@ -271,7 +271,7 @@ int main(int argc, char **argv)
print_help
();
print_help
();
exit
(
EXIT_SUCCESS
);
exit
(
EXIT_SUCCESS
);
case
'd'
:
case
'd'
:
/
* --dump-header-table */
/
/ --dump-header-table
config
.
dump_header_table
=
1
;
config
.
dump_header_table
=
1
;
break
;
break
;
case
'?'
:
case
'?'
:
...
...
src/nghttp.cc
View file @
2ae1da11
...
@@ -991,14 +991,14 @@ int htp_msg_completecb(http_parser *htp)
...
@@ -991,14 +991,14 @@ int htp_msg_completecb(http_parser *htp)
namespace
{
namespace
{
http_parser_settings
htp_hooks
=
{
http_parser_settings
htp_hooks
=
{
htp_msg_begincb
,
/
*http_cb on_message_begin;*/
htp_msg_begincb
,
/
/ http_cb on_message_begin;
nullptr
,
/
*http_data_cb on_url;*/
nullptr
,
/
/ http_data_cb on_url;
htp_status_completecb
,
/
*http_cb on_status_complete */
htp_status_completecb
,
/
/ http_cb on_status_complete;
nullptr
,
/
*http_data_cb on_header_field;*/
nullptr
,
/
/ http_data_cb on_header_field;
nullptr
,
/
*http_data_cb on_header_value;*/
nullptr
,
/
/ http_data_cb on_header_value;
nullptr
,
/
*http_cb on_headers_complete;*/
nullptr
,
/
/ http_cb on_headers_complete;
nullptr
,
/
*http_data_cb on_body;*/
nullptr
,
/
/ http_data_cb on_body;
htp_msg_completecb
/
*http_cb on_message_complete;*/
htp_msg_completecb
/
/ http_cb on_message_complete;
};
};
}
// namespace
}
// namespace
...
...
src/nghttpd.cc
View file @
2ae1da11
...
@@ -195,7 +195,7 @@ int main(int argc, char **argv)
...
@@ -195,7 +195,7 @@ int main(int argc, char **argv)
std
::
cerr
<<
"-n: Bad option value: "
<<
optarg
<<
std
::
endl
;
std
::
cerr
<<
"-n: Bad option value: "
<<
optarg
<<
std
::
endl
;
exit
(
EXIT_FAILURE
);
exit
(
EXIT_FAILURE
);
}
}
#endif
/
* NOTHREADS */
#endif /
/ NOTHREADS
break
;
break
;
case
'h'
:
case
'h'
:
print_help
(
std
::
cout
);
print_help
(
std
::
cout
);
...
@@ -278,7 +278,7 @@ int main(int argc, char **argv)
...
@@ -278,7 +278,7 @@ int main(int argc, char **argv)
SSL_library_init
();
SSL_library_init
();
#ifndef NOTHREADS
#ifndef NOTHREADS
ssl
::
LibsslGlobalLock
();
ssl
::
LibsslGlobalLock
();
#endif
/
* NOTHREADS */
#endif /
/ NOTHREADS
reset_timer
();
reset_timer
();
...
...
src/shrpx-unittest.cc
View file @
2ae1da11
...
@@ -27,7 +27,7 @@
...
@@ -27,7 +27,7 @@
#include <CUnit/Basic.h>
#include <CUnit/Basic.h>
#include <openssl/ssl.h>
#include <openssl/ssl.h>
#include <openssl/err.h>
#include <openssl/err.h>
/
* include test cases' include files here */
/
/ include test cases' include files here
#include "shrpx_ssl_test.h"
#include "shrpx_ssl_test.h"
#include "shrpx_downstream_test.h"
#include "shrpx_downstream_test.h"
#include "shrpx_config_test.h"
#include "shrpx_config_test.h"
...
@@ -55,18 +55,18 @@ int main(int argc, char* argv[])
...
@@ -55,18 +55,18 @@ int main(int argc, char* argv[])
SSL_load_error_strings
();
SSL_load_error_strings
();
SSL_library_init
();
SSL_library_init
();
/
* initialize the CUnit test registry */
/
/ initialize the CUnit test registry
if
(
CUE_SUCCESS
!=
CU_initialize_registry
())
if
(
CUE_SUCCESS
!=
CU_initialize_registry
())
return
CU_get_error
();
return
CU_get_error
();
/
* add a suite to the registry */
/
/ add a suite to the registry
pSuite
=
CU_add_suite
(
"shrpx_TestSuite"
,
init_suite1
,
clean_suite1
);
pSuite
=
CU_add_suite
(
"shrpx_TestSuite"
,
init_suite1
,
clean_suite1
);
if
(
NULL
==
pSuite
)
{
if
(
NULL
==
pSuite
)
{
CU_cleanup_registry
();
CU_cleanup_registry
();
return
CU_get_error
();
return
CU_get_error
();
}
}
/
* add the tests to the suite */
/
/ add the tests to the suite
if
(
!
CU_add_test
(
pSuite
,
"ssl_create_lookup_tree"
,
if
(
!
CU_add_test
(
pSuite
,
"ssl_create_lookup_tree"
,
shrpx
::
test_shrpx_ssl_create_lookup_tree
)
||
shrpx
::
test_shrpx_ssl_create_lookup_tree
)
||
!
CU_add_test
(
pSuite
,
"ssl_cert_lookup_tree_add_cert_from_file"
,
!
CU_add_test
(
pSuite
,
"ssl_cert_lookup_tree_add_cert_from_file"
,
...
@@ -124,7 +124,7 @@ int main(int argc, char* argv[])
...
@@ -124,7 +124,7 @@ int main(int argc, char* argv[])
return
CU_get_error
();
return
CU_get_error
();
}
}
/
* Run all tests using the CUnit Basic interface */
/
/ Run all tests using the CUnit Basic interface
CU_basic_set_mode
(
CU_BRM_VERBOSE
);
CU_basic_set_mode
(
CU_BRM_VERBOSE
);
CU_basic_run_tests
();
CU_basic_run_tests
();
num_tests_failed
=
CU_get_number_of_tests_failed
();
num_tests_failed
=
CU_get_number_of_tests_failed
();
...
...
src/shrpx.cc
View file @
2ae1da11
...
@@ -913,7 +913,7 @@ int main(int argc, char **argv)
...
@@ -913,7 +913,7 @@ int main(int argc, char **argv)
LOG
(
WARNING
)
<<
"Threading disabled at build time, no threads created."
;
LOG
(
WARNING
)
<<
"Threading disabled at build time, no threads created."
;
#else
#else
cmdcfgs
.
emplace_back
(
SHRPX_OPT_WORKERS
,
optarg
);
cmdcfgs
.
emplace_back
(
SHRPX_OPT_WORKERS
,
optarg
);
#endif
/
* NOTHREADS */
#endif /
/ NOTHREADS
break
;
break
;
case
'o'
:
case
'o'
:
cmdcfgs
.
emplace_back
(
SHRPX_OPT_FRONTEND_FRAME_DEBUG
,
"yes"
);
cmdcfgs
.
emplace_back
(
SHRPX_OPT_FRONTEND_FRAME_DEBUG
,
"yes"
);
...
@@ -1161,7 +1161,7 @@ int main(int argc, char **argv)
...
@@ -1161,7 +1161,7 @@ int main(int argc, char **argv)
SSL_library_init
();
SSL_library_init
();
#ifndef NOTHREADS
#ifndef NOTHREADS
nghttp2
::
ssl
::
LibsslGlobalLock
();
nghttp2
::
ssl
::
LibsslGlobalLock
();
#endif
/
* NOTHREADS */
#endif /
/ NOTHREADS
if
(
conf_exists
(
get_config
()
->
conf_path
))
{
if
(
conf_exists
(
get_config
()
->
conf_path
))
{
if
(
load_config
(
get_config
()
->
conf_path
)
==
-
1
)
{
if
(
load_config
(
get_config
()
->
conf_path
)
==
-
1
)
{
...
...
src/shrpx_config_test.h
View file @
2ae1da11
...
@@ -32,4 +32,4 @@ void test_shrpx_config_parse_header(void);
...
@@ -32,4 +32,4 @@ void test_shrpx_config_parse_header(void);
}
// namespace shrpx
}
// namespace shrpx
#endif
/
* SHRPX_CONFIG_TEST_H */
#endif /
/ SHRPX_CONFIG_TEST_H
src/shrpx_http2_session.cc
View file @
2ae1da11
...
@@ -527,14 +527,14 @@ int htp_hdrs_completecb(http_parser *htp)
...
@@ -527,14 +527,14 @@ int htp_hdrs_completecb(http_parser *htp)
namespace
{
namespace
{
http_parser_settings
htp_hooks
=
{
http_parser_settings
htp_hooks
=
{
nullptr
,
/
*http_cb on_message_begin;*/
nullptr
,
/
/ http_cb on_message_begin;
nullptr
,
/
*http_data_cb on_url;*/
nullptr
,
/
/ http_data_cb on_url;
nullptr
,
/
*http_cb on_status_complete */
nullptr
,
/
/ http_cb on_status_complete;
nullptr
,
/
*http_data_cb on_header_field;*/
nullptr
,
/
/ http_data_cb on_header_field;
nullptr
,
/
*http_data_cb on_header_value;*/
nullptr
,
/
/ http_data_cb on_header_value;
htp_hdrs_completecb
,
/
*http_cb on_headers_complete;*/
htp_hdrs_completecb
,
/
/ http_cb on_headers_complete;
nullptr
,
/
*http_data_cb on_body;*/
nullptr
,
/
/ http_data_cb on_body;
nullptr
/
*http_cb on_message_complete;*/
nullptr
/
/ http_cb on_message_complete;
};
};
}
// namespace
}
// namespace
...
...
src/shrpx_http_downstream_connection.cc
View file @
2ae1da11
...
@@ -488,14 +488,14 @@ int htp_msg_completecb(http_parser *htp)
...
@@ -488,14 +488,14 @@ int htp_msg_completecb(http_parser *htp)
namespace
{
namespace
{
http_parser_settings
htp_hooks
=
{
http_parser_settings
htp_hooks
=
{
nullptr
,
/
*http_cb on_message_begin;*/
nullptr
,
/
/ http_cb on_message_begin;
nullptr
,
/
*http_data_cb on_url;*/
nullptr
,
/
/ http_data_cb on_url;
nullptr
,
/
*http_cb on_status_complete */
nullptr
,
/
/ http_cb on_status_complete;
htp_hdr_keycb
,
/
*http_data_cb on_header_field;*/
htp_hdr_keycb
,
/
/ http_data_cb on_header_field;
htp_hdr_valcb
,
/
*http_data_cb on_header_value;*/
htp_hdr_valcb
,
/
/ http_data_cb on_header_value;
htp_hdrs_completecb
,
/
*http_cb on_headers_complete;*/
htp_hdrs_completecb
,
/
/ http_cb on_headers_complete;
htp_bodycb
,
/
*http_data_cb on_body;*/
htp_bodycb
,
/
/ http_data_cb on_body;
htp_msg_completecb
/
*http_cb on_message_complete;*/
htp_msg_completecb
/
/ http_cb on_message_complete;
};
};
}
// namespace
}
// namespace
...
...
src/shrpx_https_upstream.cc
View file @
2ae1da11
...
@@ -246,14 +246,14 @@ int htp_msg_completecb(http_parser *htp)
...
@@ -246,14 +246,14 @@ int htp_msg_completecb(http_parser *htp)
namespace
{
namespace
{
http_parser_settings
htp_hooks
=
{
http_parser_settings
htp_hooks
=
{
htp_msg_begin
,
/
*http_cb on_message_begin;*/
htp_msg_begin
,
/
/ http_cb on_message_begin;
htp_uricb
,
/
*http_data_cb on_url;*/
htp_uricb
,
/
/ http_data_cb on_url;
nullptr
,
/
*http_cb on_status_complete */
nullptr
,
/
/ http_cb on_status_complete;
htp_hdr_keycb
,
/
*http_data_cb on_header_field;*/
htp_hdr_keycb
,
/
/ http_data_cb on_header_field;
htp_hdr_valcb
,
/
*http_data_cb on_header_value;*/
htp_hdr_valcb
,
/
/ http_data_cb on_header_value;
htp_hdrs_completecb
,
/
*http_cb on_headers_complete;*/
htp_hdrs_completecb
,
/
/ http_cb on_headers_complete;
htp_bodycb
,
/
*http_data_cb on_body;*/
htp_bodycb
,
/
/ http_data_cb on_body;
htp_msg_completecb
/
*http_cb on_message_complete;*/
htp_msg_completecb
/
/ http_cb on_message_complete;
};
};
}
// namespace
}
// namespace
...
...
src/shrpx_ssl.cc
View file @
2ae1da11
...
@@ -296,7 +296,7 @@ SSL_CTX* create_ssl_context(const char *private_key_file,
...
@@ -296,7 +296,7 @@ SSL_CTX* create_ssl_context(const char *private_key_file,
EC_KEY_free
(
ecdh
);
EC_KEY_free
(
ecdh
);
#endif // OPENSSL_VERSION_NUBMER < 0x10002000L
#endif // OPENSSL_VERSION_NUBMER < 0x10002000L
#endif
/
* OPENSSL_NO_EC */
#endif /
/ OPENSSL_NO_EC
if
(
get_config
()
->
dh_param_file
)
{
if
(
get_config
()
->
dh_param_file
)
{
// Read DH parameters from file
// Read DH parameters from file
...
...
src/shrpx_ssl_test.h
View file @
2ae1da11
...
@@ -32,4 +32,4 @@ void test_shrpx_ssl_cert_lookup_tree_add_cert_from_file(void);
...
@@ -32,4 +32,4 @@ void test_shrpx_ssl_cert_lookup_tree_add_cert_from_file(void);
}
// namespace shrpx
}
// namespace shrpx
#endif
/
* SHRPX_SSL_TEST_H */
#endif /
/ SHRPX_SSL_TEST_H
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