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
cbd878bb
Commit
cbd878bb
authored
Jan 16, 2015
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nghttp, nghttpd: Allow unit for --header-table-size option
parent
49eeed84
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
7 deletions
+12
-7
src/nghttp.cc
src/nghttp.cc
+6
-4
src/nghttpd.cc
src/nghttpd.cc
+6
-3
No files found.
src/nghttp.cc
View file @
cbd878bb
...
...
@@ -2295,7 +2295,10 @@ Options:
--no-dep Don't send dependency based priority hint to server.
--dep-idle Use idle streams as anchor nodes to express priority.
--version Display version information and exit.
-h, --help Display this help and exit.)"
<<
std
::
endl
;
-h, --help Display this help and exit.
The <SIZE> argument is an integer and an optional unit (e.g., 10K is
10 * 1024). Units are K, M and G (powers of 1024).)"
<<
std
::
endl
;
}
}
// namespace
...
...
@@ -2334,7 +2337,6 @@ int main(int argc, char **argv) {
int
option_index
=
0
;
int
c
=
getopt_long
(
argc
,
argv
,
"M:Oab:c:d:gm:np:r:hH:vst:uw:W:"
,
long_options
,
&
option_index
);
char
*
end
;
if
(
c
==
-
1
)
{
break
;
}
...
...
@@ -2450,8 +2452,8 @@ int main(int argc, char **argv) {
break
;
case
'c'
:
errno
=
0
;
config
.
header_table_size
=
strtol
(
optarg
,
&
end
,
10
);
if
(
errno
==
ERANGE
||
*
end
!=
'\0'
)
{
config
.
header_table_size
=
util
::
parse_uint_with_unit
(
optarg
);
if
(
config
.
header_table_size
==
-
1
)
{
std
::
cerr
<<
"-c: Bad option value: "
<<
optarg
<<
std
::
endl
;
exit
(
EXIT_FAILURE
);
}
...
...
src/nghttpd.cc
View file @
cbd878bb
...
...
@@ -138,7 +138,10 @@ Options:
Start sending response when request HEADERS is received,
rather than complete request is received.
--version Display version information and exit.
-h, --help Display this help and exit.)"
<<
std
::
endl
;
-h, --help Display this help and exit.
The <SIZE> argument is an integer and an optional unit (e.g., 10K is
10 * 1024). Units are K, M and G (powers of 1024).)"
<<
std
::
endl
;
}
}
// namespace
...
...
@@ -208,8 +211,8 @@ int main(int argc, char **argv) {
break
;
case
'c'
:
errno
=
0
;
config
.
header_table_size
=
strtol
(
optarg
,
&
end
,
10
);
if
(
errno
==
ERANGE
||
*
end
!=
'\0'
)
{
config
.
header_table_size
=
util
::
parse_uint_with_unit
(
optarg
);
if
(
config
.
header_table_size
==
-
1
)
{
std
::
cerr
<<
"-c: Bad option value: "
<<
optarg
<<
std
::
endl
;
exit
(
EXIT_FAILURE
);
}
...
...
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