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
f3946ae3
Commit
f3946ae3
authored
Jan 19, 2016
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nghttpx: Remove assignment of zero values
Because of zero initialization, these assignments are unnecessary.
parent
2f994632
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
55 deletions
+5
-55
src/shrpx.cc
src/shrpx.cc
+5
-55
No files found.
src/shrpx.cc
View file @
f3946ae3
...
...
@@ -905,31 +905,14 @@ namespace {
void
fill_default_config
()
{
*
mod_config
()
=
{};
mod_config
()
->
verbose
=
false
;
mod_config
()
->
daemon
=
false
;
mod_config
()
->
num_worker
=
1
;
mod_config
()
->
conf_path
=
strcopy
(
"/etc/nghttpx/nghttpx.conf"
);
mod_config
()
->
http2_proxy
=
false
;
mod_config
()
->
http2_bridge
=
false
;
mod_config
()
->
client_proxy
=
false
;
mod_config
()
->
client
=
false
;
mod_config
()
->
client_mode
=
false
;
mod_config
()
->
pid_file
=
nullptr
;
mod_config
()
->
user
=
nullptr
;
mod_config
()
->
uid
=
0
;
mod_config
()
->
gid
=
0
;
mod_config
()
->
pid
=
getpid
();
mod_config
()
->
padding
=
0
;
mod_config
()
->
argc
=
0
;
mod_config
()
->
argv
=
nullptr
;
auto
&
tlsconf
=
mod_config
()
->
tls
;
{
auto
&
ticketconf
=
tlsconf
.
ticket
;
ticketconf
.
cipher
=
EVP_aes_128_cbc
();
ticketconf
.
cipher_given
=
false
;
{
auto
&
memcachedconf
=
ticketconf
.
memcached
;
...
...
@@ -943,45 +926,22 @@ void fill_default_config() {
ocspconf
.
update_interval
=
4
_h
;
ocspconf
.
fetch_ocsp_response_file
=
strcopy
(
PKGDATADIR
"/fetch-ocsp-response"
);
ocspconf
.
disabled
=
false
;
auto
&
client_verify
=
tlsconf
.
client_verify
;
client_verify
.
enabled
=
false
;
auto
&
dyn_recconf
=
tlsconf
.
dyn_rec
;
dyn_recconf
.
warmup_threshold
=
1
_m
;
dyn_recconf
.
idle_timeout
=
1
.
;
dyn_recconf
.
idle_timeout
=
1
_s
;
tlsconf
.
session_timeout
=
std
::
chrono
::
hours
(
12
);
tlsconf
.
tls_proto_mask
=
0
;
tlsconf
.
insecure
=
false
;
}
auto
&
httpconf
=
mod_config
()
->
http
;
{
auto
&
xffconf
=
httpconf
.
xff
;
xffconf
.
add
=
false
;
xffconf
.
strip_incoming
=
false
;
}
httpconf
.
server_name
=
"nghttpx nghttp2/"
NGHTTP2_VERSION
;
httpconf
.
no_via
=
false
;
httpconf
.
no_location_rewrite
=
false
;
httpconf
.
no_host_rewrite
=
true
;
httpconf
.
header_field_buffer
=
64
_k
;
httpconf
.
max_header_fields
=
100
;
auto
&
http2conf
=
mod_config
()
->
http2
;
{
auto
&
timeoutconf
=
http2conf
.
timeout
;
{
// Read timeout for HTTP/2 stream
timeoutconf
.
stream_read
=
0.
;
// Write timeout for HTTP/2 stream
timeoutconf
.
stream_write
=
0.
;
}
auto
&
upstreamconf
=
http2conf
.
upstream
;
// window bits for HTTP/2 and SPDY upstream connection per
// stream. 2**16-1 = 64KiB-1, which is HTTP/2 default. Please note
...
...
@@ -995,11 +955,11 @@ void fill_default_config() {
nghttp2_option_set_no_auto_window_update
(
upstreamconf
.
option
,
1
);
nghttp2_option_set_no_recv_client_magic
(
upstreamconf
.
option
,
1
);
}
{
auto
&
downstreamconf
=
http2conf
.
downstream
;
downstreamconf
.
window_bits
=
16
;
downstreamconf
.
connection_window_bits
=
16
;
downstreamconf
.
connections_per_worker
=
0
;
nghttp2_option_new
(
&
downstreamconf
.
option
);
nghttp2_option_set_no_auto_window_update
(
downstreamconf
.
option
,
1
);
...
...
@@ -1007,18 +967,14 @@ void fill_default_config() {
}
http2conf
.
max_concurrent_streams
=
100
;
http2conf
.
no_cookie_crumbling
=
false
;
http2conf
.
no_server_push
=
false
;
auto
&
loggingconf
=
mod_config
()
->
logging
;
{
auto
&
accessconf
=
loggingconf
.
access
;
accessconf
.
syslog
=
false
;
accessconf
.
format
=
parse_log_format
(
DEFAULT_ACCESSLOG_FORMAT
);
auto
&
errorconf
=
loggingconf
.
error
;
errorconf
.
file
=
strcopy
(
"/dev/stderr"
);
errorconf
.
syslog
=
false
;
}
loggingconf
.
syslog_facility
=
LOG_DAEMON
;
...
...
@@ -1031,7 +987,6 @@ void fill_default_config() {
listenerconf
.
port
=
3000
;
// Default accept() backlog
listenerconf
.
backlog
=
512
;
listenerconf
.
host_unix
=
false
;
listenerconf
.
timeout
.
sleep
=
30
_s
;
}
}
...
...
@@ -1047,10 +1002,8 @@ void fill_default_config() {
timeoutconf
.
read
=
1
_min
;
// Write timeout for HTTP2/non-HTTP2 upstream connection
timeoutconf
.
write
=
30
.
;
timeoutconf
.
write
=
30
_s
;
}
upstreamconf
.
no_tls
=
false
;
}
{
...
...
@@ -1059,14 +1012,11 @@ void fill_default_config() {
auto
&
timeoutconf
=
downstreamconf
.
timeout
;
// Read/Write timeouts for downstream connection
timeoutconf
.
read
=
1
_min
;
timeoutconf
.
write
=
30
.
;
timeoutconf
.
write
=
30
_s
;
// Timeout for pooled (idle) connections
timeoutconf
.
idle_read
=
2
.
;
timeoutconf
.
idle_read
=
2
_s
;
}
downstreamconf
.
no_tls
=
false
;
downstreamconf
.
ipv4
=
false
;
downstreamconf
.
ipv6
=
false
;
downstreamconf
.
connections_per_host
=
8
;
downstreamconf
.
request_buffer_size
=
16
_k
;
downstreamconf
.
response_buffer_size
=
16
_k
;
...
...
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