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
fc251434
Commit
fc251434
authored
Feb 21, 2014
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove END_PUSH_PROMISE in favor of END_HEADERS
parent
a2117539
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
15 additions
and
19 deletions
+15
-19
lib/includes/nghttp2/nghttp2.h
lib/includes/nghttp2/nghttp2.h
+1
-5
lib/nghttp2_submit.c
lib/nghttp2_submit.c
+1
-1
src/HttpServer.cc
src/HttpServer.cc
+1
-1
src/app_helper.cc
src/app_helper.cc
+2
-2
tests/nghttp2_frame_test.c
tests/nghttp2_frame_test.c
+2
-2
tests/nghttp2_session_test.c
tests/nghttp2_session_test.c
+8
-8
No files found.
lib/includes/nghttp2/nghttp2.h
View file @
fc251434
...
...
@@ -394,10 +394,6 @@ typedef enum {
* The PRIORITY flag.
*/
NGHTTP2_FLAG_PRIORITY
=
0x8
,
/**
* The END_PUSH_PROMISE flag.
*/
NGHTTP2_FLAG_END_PUSH_PROMISE
=
0x4
,
/**
* The ACK flag.
*/
...
...
@@ -2128,7 +2124,7 @@ int nghttp2_submit_settings(nghttp2_session *session, uint8_t flags,
*
* Submits PUSH_PROMISE frame. The |flags| is currently ignored and
* the resulting PUSH_PROMISE frame always has
* :enum:`NGHTTP2_FLAG_END_
PUSH_PROMISE
` flag set due to the lack of
* :enum:`NGHTTP2_FLAG_END_
HEADERS
` flag set due to the lack of
* header continuation support in the library.
*
* The |stream_id| must be client initiated stream ID.
...
...
lib/nghttp2_submit.c
View file @
fc251434
...
...
@@ -197,7 +197,7 @@ int nghttp2_submit_push_promise(nghttp2_session *session, uint8_t flags,
free
(
frame
);
return
rv
;
}
flags_copy
=
NGHTTP2_FLAG_END_
PUSH_PROMISE
;
flags_copy
=
NGHTTP2_FLAG_END_
HEADERS
;
nghttp2_frame_push_promise_init
(
&
frame
->
push_promise
,
flags_copy
,
stream_id
,
-
1
,
nva_copy
,
nvlen
);
rv
=
nghttp2_session_add_frame
(
session
,
NGHTTP2_CAT_CTRL
,
frame
,
NULL
);
...
...
src/HttpServer.cc
View file @
fc251434
...
...
@@ -514,7 +514,7 @@ int Http2Handler::submit_push_promise(Request *req,
http2
::
make_nv_ll
(
":scheme"
,
"https"
),
http2
::
make_nv_ls
(
":authority"
,
(
*
itr
).
second
)
};
return
nghttp2_submit_push_promise
(
session_
,
NGHTTP2_FLAG_END_
PUSH_PROMISE
,
return
nghttp2_submit_push_promise
(
session_
,
NGHTTP2_FLAG_END_
HEADERS
,
req
->
stream_id
,
nva
.
data
(),
nva
.
size
());
}
...
...
src/app_helper.cc
View file @
fc251434
...
...
@@ -272,8 +272,8 @@ void print_flags(const nghttp2_frame_hd& hd)
}
break
;
case
NGHTTP2_PUSH_PROMISE
:
if
(
hd
.
flags
&
NGHTTP2_FLAG_END_
PUSH_PROMISE
)
{
s
+=
"END_
PUSH_PROMISE
"
;
if
(
hd
.
flags
&
NGHTTP2_FLAG_END_
HEADERS
)
{
s
+=
"END_
HEADERS
"
;
}
if
(
hd
.
flags
&
NGHTTP2_FLAG_PAD_LOW
)
{
if
(
!
s
.
empty
())
{
...
...
tests/nghttp2_frame_test.c
View file @
fc251434
...
...
@@ -276,7 +276,7 @@ void test_nghttp2_frame_pack_push_promise()
nva
=
headers
();
nvlen
=
HEADERS_LENGTH
;
nghttp2_frame_push_promise_init
(
&
frame
,
NGHTTP2_FLAG_END_
PUSH_PROMISE
,
nghttp2_frame_push_promise_init
(
&
frame
,
NGHTTP2_FLAG_END_
HEADERS
,
1000000007
,
(
1U
<<
31
)
-
1
,
nva
,
nvlen
);
framelen
=
nghttp2_frame_pack_push_promise
(
&
buf
,
&
buflen
,
&
bufoff
,
&
frame
,
&
deflater
);
...
...
@@ -285,7 +285,7 @@ void test_nghttp2_frame_pack_push_promise()
buf
+
bufoff
,
framelen
-
bufoff
));
check_frame_header
(
framelen
-
bufoff
-
NGHTTP2_FRAME_HEAD_LENGTH
,
NGHTTP2_PUSH_PROMISE
,
NGHTTP2_FLAG_END_
PUSH_PROMISE
,
1000000007
,
&
oframe
.
hd
);
NGHTTP2_FLAG_END_
HEADERS
,
1000000007
,
&
oframe
.
hd
);
CU_ASSERT
((
1U
<<
31
)
-
1
==
oframe
.
promised_stream_id
);
nv_offset
=
bufoff
+
NGHTTP2_FRAME_HEAD_LENGTH
+
4
;
...
...
tests/nghttp2_session_test.c
View file @
fc251434
...
...
@@ -1511,7 +1511,7 @@ void test_nghttp2_session_on_push_promise_received(void)
NGHTTP2_PRI_DEFAULT
,
NGHTTP2_STREAM_OPENING
,
NULL
);
nghttp2_frame_push_promise_init
(
&
frame
.
push_promise
,
NGHTTP2_FLAG_END_
PUSH_PROMISE
,
1
,
2
,
NGHTTP2_FLAG_END_
HEADERS
,
1
,
2
,
NULL
,
0
);
user_data
.
begin_headers_cb_called
=
0
;
...
...
@@ -1626,7 +1626,7 @@ void test_nghttp2_session_on_push_promise_received(void)
NGHTTP2_STREAM_RESERVED
,
NULL
);
/* Attempt to PUSH_PROMISE against reserved (remote) stream */
nghttp2_frame_push_promise_init
(
&
frame
.
push_promise
,
NGHTTP2_FLAG_END_
PUSH_PROMISE
,
2
,
4
,
NGHTTP2_FLAG_END_
HEADERS
,
2
,
4
,
NULL
,
0
);
user_data
.
begin_headers_cb_called
=
0
;
...
...
@@ -1651,7 +1651,7 @@ void test_nghttp2_session_on_push_promise_received(void)
session
->
local_settings
[
NGHTTP2_SETTINGS_ENABLE_PUSH
]
=
0
;
nghttp2_frame_push_promise_init
(
&
frame
.
push_promise
,
NGHTTP2_FLAG_END_
PUSH_PROMISE
,
1
,
2
,
NGHTTP2_FLAG_END_
HEADERS
,
1
,
2
,
NULL
,
0
);
user_data
.
begin_headers_cb_called
=
0
;
...
...
@@ -1674,7 +1674,7 @@ void test_nghttp2_session_on_push_promise_received(void)
NGHTTP2_STREAM_OPENING
,
NULL
);
nvlen
=
nghttp2_nv_array_copy
(
&
nva
,
malformed_nva
,
ARRLEN
(
malformed_nva
));
nghttp2_frame_push_promise_init
(
&
frame
.
push_promise
,
NGHTTP2_FLAG_END_
PUSH_PROMISE
,
1
,
2
,
NGHTTP2_FLAG_END_
HEADERS
,
1
,
2
,
nva
,
nvlen
);
user_data
.
begin_headers_cb_called
=
0
;
user_data
.
invalid_frame_recv_cb_called
=
0
;
...
...
@@ -2018,7 +2018,7 @@ void test_nghttp2_session_send_push_promise(void)
NGHTTP2_PRI_DEFAULT
,
NGHTTP2_STREAM_OPENING
,
NULL
);
nghttp2_frame_push_promise_init
(
&
frame
->
push_promise
,
NGHTTP2_FLAG_END_
PUSH_PROMISE
,
1
,
-
1
,
NGHTTP2_FLAG_END_
HEADERS
,
1
,
-
1
,
NULL
,
0
);
nghttp2_session_add_frame
(
session
,
NGHTTP2_CAT_CTRL
,
frame
,
NULL
);
...
...
@@ -2038,7 +2038,7 @@ void test_nghttp2_session_send_push_promise(void)
frame
=
malloc
(
sizeof
(
nghttp2_frame
));
nghttp2_frame_push_promise_init
(
&
frame
->
push_promise
,
NGHTTP2_FLAG_END_
PUSH_PROMISE
,
1
,
-
1
,
NGHTTP2_FLAG_END_
HEADERS
,
1
,
-
1
,
NULL
,
0
);
nghttp2_session_add_frame
(
session
,
NGHTTP2_CAT_CTRL
,
frame
,
NULL
);
ud
.
frame_not_send_cb_called
=
0
;
...
...
@@ -2057,7 +2057,7 @@ void test_nghttp2_session_send_push_promise(void)
NULL
);
frame
=
malloc
(
sizeof
(
nghttp2_frame
));
nghttp2_frame_push_promise_init
(
&
frame
->
push_promise
,
NGHTTP2_FLAG_END_
PUSH_PROMISE
,
1
,
-
1
,
NGHTTP2_FLAG_END_
HEADERS
,
1
,
-
1
,
NULL
,
0
);
nghttp2_session_add_frame
(
session
,
NGHTTP2_CAT_CTRL
,
frame
,
NULL
);
...
...
@@ -2200,7 +2200,7 @@ void test_nghttp2_session_reprioritize_stream(void)
NGHTTP2_STREAM_OPENING
,
NULL
);
CU_ASSERT
(
0
==
nghttp2_submit_push_promise
(
session
,
NGHTTP2_FLAG_END_
PUSH_PROMISE
,
NGHTTP2_FLAG_END_
HEADERS
,
3
,
NULL
,
0
));
ud
.
block_count
=
0
;
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