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
53111853
Commit
53111853
authored
Jan 22, 2017
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nghttpx: Define the maximum number of digits in uint64_t
parent
2fc2a27a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
src/shrpx_log.cc
src/shrpx_log.cc
+1
-1
src/util.h
src/util.h
+3
-1
No files found.
src/shrpx_log.cc
View file @
53111853
...
...
@@ -233,7 +233,7 @@ template <typename OutputIterator, typename T>
std
::
pair
<
OutputIterator
,
OutputIterator
>
copy
(
T
n
,
OutputIterator
d_first
,
OutputIterator
d_last
)
{
if
(
static_cast
<
size_t
>
(
std
::
distance
(
d_first
,
d_last
))
<
str_size
(
"18446744073709551615"
)
)
{
NGHTTP2_MAX_UINT64_DIGITS
)
{
return
std
::
make_pair
(
d_last
,
d_last
);
}
return
std
::
make_pair
(
util
::
utos
(
d_first
,
n
),
d_last
);
...
...
src/util.h
View file @
53111853
...
...
@@ -70,6 +70,8 @@ constexpr auto NGHTTP2_H2_14 = StringRef::from_lit("h2-14");
constexpr
auto
NGHTTP2_H1_1_ALPN
=
StringRef
::
from_lit
(
"\x8http/1.1"
);
constexpr
auto
NGHTTP2_H1_1
=
StringRef
::
from_lit
(
"http/1.1"
);
constexpr
size_t
NGHTTP2_MAX_UINT64_DIGITS
=
str_size
(
"18446744073709551615"
);
namespace
util
{
inline
bool
is_alpha
(
const
char
c
)
{
...
...
@@ -382,7 +384,7 @@ template <typename T, typename OutputIt> OutputIt utos(OutputIt dst, T n) {
template
<
typename
T
>
StringRef
make_string_ref_uint
(
BlockAllocator
&
balloc
,
T
n
)
{
auto
iov
=
make_byte_ref
(
balloc
,
str_size
(
"18446744073709551615"
)
+
1
);
auto
iov
=
make_byte_ref
(
balloc
,
NGHTTP2_MAX_UINT64_DIGITS
+
1
);
auto
p
=
iov
.
base
;
p
=
util
::
utos
(
p
,
n
);
*
p
=
'\0'
;
...
...
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