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
54bf2256
Commit
54bf2256
authored
Oct 15, 2015
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
clang-format-3.5
parent
bb43b8e4
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
15 deletions
+15
-15
src/shrpx_config.cc
src/shrpx_config.cc
+1
-1
src/shrpx_log.cc
src/shrpx_log.cc
+2
-2
src/util.cc
src/util.cc
+10
-11
src/util.h
src/util.h
+2
-1
No files found.
src/shrpx_config.cc
View file @
54bf2256
...
...
@@ -1458,7 +1458,7 @@ int parse_config(const char *opt, const char *optarg,
mod_config
()
->
fastopen
=
n
;
return
0
;
}
}
case
SHRPX_OPTID_BACKEND_KEEP_ALIVE_TIMEOUT
:
return
parse_duration
(
&
mod_config
()
->
downstream_idle_read_timeout
,
opt
,
optarg
);
...
...
src/shrpx_log.cc
View file @
54bf2256
...
...
@@ -364,8 +364,8 @@ int reopen_log_files() {
lgconf
->
accesslog_fd
=
new_accesslog_fd
;
lgconf
->
errorlog_fd
=
new_errorlog_fd
;
lgconf
->
errorlog_tty
=
(
new_errorlog_fd
==
-
1
)
?
false
:
isatty
(
new_errorlog_fd
);
lgconf
->
errorlog_tty
=
(
new_errorlog_fd
==
-
1
)
?
false
:
isatty
(
new_errorlog_fd
);
return
res
;
}
...
...
src/util.cc
View file @
54bf2256
...
...
@@ -659,9 +659,7 @@ void store_original_fds() {
make_socket_closeonexec
(
STDERR_COPY
);
}
void
restore_original_fds
()
{
dup2
(
STDERR_COPY
,
STDERR_FILENO
);
}
void
restore_original_fds
()
{
dup2
(
STDERR_COPY
,
STDERR_FILENO
);
}
void
close_log_file
(
int
&
fd
)
{
if
(
fd
!=
STDERR_COPY
&&
fd
!=
STDOUT_COPY
&&
fd
!=
-
1
)
{
...
...
@@ -771,8 +769,8 @@ bool check_h2_is_selected(const unsigned char *proto, size_t len) {
namespace
{
bool
select_proto
(
const
unsigned
char
**
out
,
unsigned
char
*
outlen
,
const
unsigned
char
*
in
,
unsigned
int
inlen
,
const
char
*
key
,
unsigned
int
keylen
)
{
const
unsigned
char
*
in
,
unsigned
int
inlen
,
const
char
*
key
,
unsigned
int
keylen
)
{
for
(
auto
p
=
in
,
end
=
in
+
inlen
;
p
+
keylen
<=
end
;
p
+=
*
p
+
1
)
{
if
(
std
::
equal
(
key
,
key
+
keylen
,
p
))
{
*
out
=
p
+
1
;
...
...
@@ -787,17 +785,19 @@ bool select_proto(const unsigned char **out, unsigned char *outlen,
bool
select_h2
(
const
unsigned
char
**
out
,
unsigned
char
*
outlen
,
const
unsigned
char
*
in
,
unsigned
int
inlen
)
{
return
select_proto
(
out
,
outlen
,
in
,
inlen
,
NGHTTP2_PROTO_ALPN
,
str_size
(
NGHTTP2_PROTO_ALPN
))
||
str_size
(
NGHTTP2_PROTO_ALPN
))
||
select_proto
(
out
,
outlen
,
in
,
inlen
,
NGHTTP2_H2_16_ALPN
,
str_size
(
NGHTTP2_H2_16_ALPN
))
||
str_size
(
NGHTTP2_H2_16_ALPN
))
||
select_proto
(
out
,
outlen
,
in
,
inlen
,
NGHTTP2_H2_14_ALPN
,
str_size
(
NGHTTP2_H2_14_ALPN
));
str_size
(
NGHTTP2_H2_14_ALPN
));
}
bool
select_protocol
(
const
unsigned
char
**
out
,
unsigned
char
*
outlen
,
const
unsigned
char
*
in
,
unsigned
int
inlen
,
std
::
vector
<
std
::
string
>
proto_list
)
{
const
unsigned
char
*
in
,
unsigned
int
inlen
,
std
::
vector
<
std
::
string
>
proto_list
)
{
for
(
const
auto
&
proto
:
proto_list
)
{
if
(
select_proto
(
out
,
outlen
,
in
,
inlen
,
proto
.
c_str
(),
static_cast
<
unsigned
int
>
(
proto
.
size
())))
{
if
(
select_proto
(
out
,
outlen
,
in
,
inlen
,
proto
.
c_str
(),
static_cast
<
unsigned
int
>
(
proto
.
size
())))
{
return
true
;
}
}
...
...
@@ -818,7 +818,6 @@ std::vector<unsigned char> get_default_alpn() {
return
res
;
}
std
::
vector
<
Range
<
const
char
*>>
split_config_str_list
(
const
char
*
s
,
char
delim
)
{
size_t
len
=
1
;
...
...
src/util.h
View file @
54bf2256
...
...
@@ -579,7 +579,8 @@ bool select_h2(const unsigned char **out, unsigned char *outlen,
// present in |in| of length inlen. Returns true if identifier is
// selected.
bool
select_protocol
(
const
unsigned
char
**
out
,
unsigned
char
*
outlen
,
const
unsigned
char
*
in
,
unsigned
int
inlen
,
std
::
vector
<
std
::
string
>
proto_list
);
const
unsigned
char
*
in
,
unsigned
int
inlen
,
std
::
vector
<
std
::
string
>
proto_list
);
// Returns default ALPN protocol list, which only contains supported
// HTTP/2 protocol identifier.
...
...
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