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
7f72aeda
Commit
7f72aeda
authored
Oct 22, 2013
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix error with maintainer-mode
parent
88348a60
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
8 deletions
+11
-8
hdtest/deflatehd.c
hdtest/deflatehd.c
+5
-4
hdtest/inflatehd.c
hdtest/inflatehd.c
+6
-4
No files found.
hdtest/deflatehd.c
View file @
7f72aeda
...
...
@@ -104,7 +104,7 @@ static int deflate_hd(json_t *obj, nghttp2_hd_context *deflater, int seq)
static
int
perform
(
nghttp2_hd_side
side
)
{
nghttp2_hd_context
deflater
;
int
i
=
0
;
size_t
i
;
json_t
*
json
;
json_error_t
error
;
size_t
len
;
...
...
@@ -112,7 +112,7 @@ static int perform(nghttp2_hd_side side)
json
=
json_loadf
(
stdin
,
0
,
&
error
);
if
(
json
==
NULL
)
{
fprintf
(
stderr
,
"JSON loading failed
\n
"
);
return
-
1
;
exit
(
EXIT_FAILURE
)
;
}
nghttp2_hd_deflate_init
(
&
deflater
,
side
);
printf
(
"[
\n
"
);
...
...
@@ -120,7 +120,8 @@ static int perform(nghttp2_hd_side side)
for
(
i
=
0
;
i
<
len
;
++
i
)
{
json_t
*
obj
=
json_array_get
(
json
,
i
);
if
(
!
json_is_object
(
obj
))
{
fprintf
(
stderr
,
"Unexpected JSON type at %d. It should be object.
\n
"
,
i
);
fprintf
(
stderr
,
"Unexpected JSON type at %zu. It should be object.
\n
"
,
i
);
continue
;
}
if
(
deflate_hd
(
obj
,
&
deflater
,
i
)
!=
0
)
{
...
...
@@ -136,7 +137,7 @@ static int perform(nghttp2_hd_side side)
return
0
;
}
static
void
print_help
()
static
void
print_help
(
void
)
{
printf
(
"Usage: deflatehd [-r] < INPUT
\n\n
"
"Reads JSON array from stdin and outputs deflated header block
\n
"
...
...
hdtest/inflatehd.c
View file @
7f72aeda
...
...
@@ -88,14 +88,15 @@ static int inflate_hd(json_t *obj, nghttp2_hd_context *inflater, int seq)
static
int
perform
(
nghttp2_hd_side
side
)
{
nghttp2_hd_context
inflater
;
int
i
=
0
;
size_t
i
;
json_t
*
json
;
json_error_t
error
;
size_t
len
;
json
=
json_loadf
(
stdin
,
0
,
&
error
);
if
(
json
==
NULL
)
{
return
-
1
;
fprintf
(
stderr
,
"JSON loading failed
\n
"
);
exit
(
EXIT_FAILURE
);
}
nghttp2_hd_inflate_init
(
&
inflater
,
side
);
printf
(
"[
\n
"
);
...
...
@@ -103,7 +104,8 @@ static int perform(nghttp2_hd_side side)
for
(
i
=
0
;
i
<
len
;
++
i
)
{
json_t
*
obj
=
json_array_get
(
json
,
i
);
if
(
!
json_is_object
(
obj
))
{
fprintf
(
stderr
,
"Unexpected JSON type at %d. It should be object.
\n
"
,
i
);
fprintf
(
stderr
,
"Unexpected JSON type at %zu. It should be object.
\n
"
,
i
);
continue
;
}
if
(
inflate_hd
(
obj
,
&
inflater
,
i
)
!=
0
)
{
...
...
@@ -119,7 +121,7 @@ static int perform(nghttp2_hd_side side)
return
0
;
}
static
void
print_help
()
static
void
print_help
(
void
)
{
printf
(
"Usage: inflatehd [-r] < INPUT
\n\n
"
"Reads JSON array from stdin and outputs inflated name/value pairs
\n
"
...
...
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