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
2d15dca0
Commit
2d15dca0
authored
Apr 01, 2015
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'alagoutte-scan-build'
parents
0c8ec7bf
5f05135d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
25 deletions
+24
-25
lib/nghttp2_stream.c
lib/nghttp2_stream.c
+0
-1
tests/nghttp2_session_test.c
tests/nghttp2_session_test.c
+24
-24
No files found.
lib/nghttp2_stream.c
View file @
2d15dca0
...
...
@@ -119,7 +119,6 @@ static int stream_push_item(nghttp2_stream *stream, nghttp2_session *session) {
}
break
;
default:
rv
=
0
;
/* should not reach here */
assert
(
0
);
}
...
...
tests/nghttp2_session_test.c
View file @
2d15dca0
...
...
@@ -2336,9 +2336,9 @@ void test_nghttp2_session_on_push_promise_received(void) {
nghttp2_session_client_new
(
&
session
,
&
callbacks
,
&
user_data
);
stream
=
nghttp2_session_open_stream
(
session
,
2
,
NGHTTP2_STREAM_FLAG_NONE
,
&
pri_spec_default
,
NGHTTP2_STREAM_RESERVED
,
NULL
);
nghttp2_session_open_stream
(
session
,
2
,
NGHTTP2_STREAM_FLAG_NONE
,
&
pri_spec_default
,
NGHTTP2_STREAM_RESERVED
,
NULL
);
/* Attempt to PUSH_PROMISE against reserved (remote) stream */
nghttp2_frame_push_promise_init
(
&
frame
.
push_promise
,
NGHTTP2_FLAG_END_HEADERS
,
2
,
4
,
NULL
,
0
);
...
...
@@ -2357,9 +2357,9 @@ void test_nghttp2_session_on_push_promise_received(void) {
/* Disable PUSH */
nghttp2_session_client_new
(
&
session
,
&
callbacks
,
&
user_data
);
stream
=
nghttp2_session_open_stream
(
session
,
1
,
NGHTTP2_STREAM_FLAG_NONE
,
&
pri_spec_default
,
NGHTTP2_STREAM_OPENING
,
NULL
);
nghttp2_session_open_stream
(
session
,
1
,
NGHTTP2_STREAM_FLAG_NONE
,
&
pri_spec_default
,
NGHTTP2_STREAM_OPENING
,
NULL
);
session
->
local_settings
.
enable_push
=
0
;
...
...
@@ -2380,9 +2380,9 @@ void test_nghttp2_session_on_push_promise_received(void) {
/* Check malformed headers. We accept malformed headers */
nghttp2_session_client_new
(
&
session
,
&
callbacks
,
&
user_data
);
stream
=
nghttp2_session_open_stream
(
session
,
1
,
NGHTTP2_STREAM_FLAG_NONE
,
&
pri_spec_default
,
NGHTTP2_STREAM_OPENING
,
NULL
);
nghttp2_session_open_stream
(
session
,
1
,
NGHTTP2_STREAM_FLAG_NONE
,
&
pri_spec_default
,
NGHTTP2_STREAM_OPENING
,
NULL
);
nvlen
=
ARRLEN
(
malformed_nva
);
nghttp2_nv_array_copy
(
&
nva
,
malformed_nva
,
nvlen
,
mem
);
nghttp2_frame_push_promise_init
(
&
frame
.
push_promise
,
NGHTTP2_FLAG_END_HEADERS
,
...
...
@@ -2401,9 +2401,9 @@ void test_nghttp2_session_on_push_promise_received(void) {
peer, incoming PUSH_PROMISE is rejected */
nghttp2_session_client_new
(
&
session
,
&
callbacks
,
&
user_data
);
stream
=
nghttp2_session_open_stream
(
session
,
1
,
NGHTTP2_STREAM_FLAG_NONE
,
&
pri_spec_default
,
NGHTTP2_STREAM_OPENING
,
NULL
);
nghttp2_session_open_stream
(
session
,
1
,
NGHTTP2_STREAM_FLAG_NONE
,
&
pri_spec_default
,
NGHTTP2_STREAM_OPENING
,
NULL
);
/* Submit settings with ENABLE_PUSH = 0 (thus disabling push) */
nghttp2_submit_settings
(
session
,
NGHTTP2_FLAG_NONE
,
&
iv
,
1
);
...
...
@@ -2551,9 +2551,9 @@ void test_nghttp2_session_on_window_update_received(void) {
/* Receiving WINDOW_UPDATE on reserved (remote) stream is a
connection error */
stream
=
nghttp2_session_open_stream
(
session
,
2
,
NGHTTP2_STREAM_FLAG_NONE
,
&
pri_spec_default
,
NGHTTP2_STREAM_RESERVED
,
NULL
);
nghttp2_session_open_stream
(
session
,
2
,
NGHTTP2_STREAM_FLAG_NONE
,
&
pri_spec_default
,
NGHTTP2_STREAM_RESERVED
,
NULL
);
nghttp2_frame_window_update_init
(
&
frame
.
window_update
,
NGHTTP2_FLAG_NONE
,
2
,
4096
);
...
...
@@ -2612,9 +2612,9 @@ void test_nghttp2_session_on_data_received(void) {
CU_ASSERT
(
NGHTTP2_SHUT_RD
==
stream
->
shut_flags
);
/* If NGHTTP2_STREAM_CLOSING state, DATA frame is discarded. */
stream
=
nghttp2_session_open_stream
(
session
,
4
,
NGHTTP2_STREAM_FLAG_NONE
,
&
pri_spec_default
,
NGHTTP2_STREAM_CLOSING
,
NULL
);
nghttp2_session_open_stream
(
session
,
4
,
NGHTTP2_STREAM_FLAG_NONE
,
&
pri_spec_default
,
NGHTTP2_STREAM_CLOSING
,
NULL
);
frame
.
hd
.
flags
=
NGHTTP2_FLAG_NONE
;
frame
.
hd
.
stream_id
=
4
;
...
...
@@ -3643,9 +3643,9 @@ void test_nghttp2_submit_headers_push_reply(void) {
/* Sending HEADERS from client against stream in reserved state is
error */
CU_ASSERT
(
0
==
nghttp2_session_client_new
(
&
session
,
&
callbacks
,
&
ud
));
stream
=
nghttp2_session_open_stream
(
session
,
2
,
NGHTTP2_STREAM_FLAG_NONE
,
&
pri_spec_default
,
NGHTTP2_STREAM_RESERVED
,
NULL
);
nghttp2_session_open_stream
(
session
,
2
,
NGHTTP2_STREAM_FLAG_NONE
,
&
pri_spec_default
,
NGHTTP2_STREAM_RESERVED
,
NULL
);
CU_ASSERT
(
0
==
nghttp2_submit_headers
(
session
,
NGHTTP2_FLAG_NONE
,
2
,
NULL
,
reqnv
,
ARRLEN
(
reqnv
),
NULL
));
...
...
@@ -3910,9 +3910,9 @@ void test_nghttp2_submit_settings_update_local_window_size(void) {
stream
->
local_window_size
=
NGHTTP2_INITIAL_WINDOW_SIZE
+
100
;
stream
->
recv_window_size
=
32768
;
stream
=
nghttp2_session_open_stream
(
session
,
3
,
NGHTTP2_STREAM_FLAG_NONE
,
&
pri_spec_default
,
NGHTTP2_STREAM_OPENED
,
NULL
);
nghttp2_session_open_stream
(
session
,
3
,
NGHTTP2_STREAM_FLAG_NONE
,
&
pri_spec_default
,
NGHTTP2_STREAM_OPENED
,
NULL
);
CU_ASSERT
(
0
==
nghttp2_submit_settings
(
session
,
NGHTTP2_FLAG_NONE
,
iv
,
1
));
CU_ASSERT
(
0
==
nghttp2_session_send
(
session
));
...
...
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