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
b27b002a
Commit
b27b002a
authored
Nov 21, 2015
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
python: Use nghttp2_session_get_stream_remote_close
parent
8481bc6e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
13 deletions
+4
-13
python/cnghttp2.pxd
python/cnghttp2.pxd
+1
-9
python/nghttp2.pyx
python/nghttp2.pyx
+3
-4
No files found.
python/cnghttp2.pxd
View file @
b27b002a
...
...
@@ -290,15 +290,7 @@ cdef extern from 'nghttp2/nghttp2.h':
int
nghttp2_session_check_server_session
(
nghttp2_session
*
session
)
ctypedef
struct
nghttp2_stream
:
pass
nghttp2_stream
*
nghttp2_session_find_stream
(
nghttp2_session
*
session
,
int32_t
stream_id
)
ctypedef
enum
nghttp2_stream_proto_state
:
NGHTTP2_STREAM_STATE_OPEN
nghttp2_stream_proto_state
nghttp2_stream_get_state
(
nghttp2_stream
*
stream
)
int
nghttp2_session_get_stream_remote_close
(
nghttp2_session
*
session
,
int32_t
stream_id
)
int
nghttp2_hd_deflate_new
(
nghttp2_hd_deflater
**
deflater_ptr
,
size_t
deflate_hd_table_bufsize_max
)
...
...
python/nghttp2.pyx
View file @
b27b002a
...
...
@@ -541,10 +541,9 @@ cdef ssize_t data_source_read(cnghttp2.nghttp2_session *session,
data_flags
[
0
]
=
cnghttp2
.
NGHTTP2_DATA_FLAG_EOF
if
cnghttp2
.
nghttp2_session_check_server_session
(
session
):
# Send RST_STREAM if remote is not closed yet
cstrm
=
cnghttp2
.
nghttp2_session_find_stream
(
session
,
stream_id
)
state
=
cnghttp2
.
nghttp2_stream_get_state
(
cstrm
)
if
state
==
cnghttp2
.
NGHTTP2_STREAM_STATE_OPEN
:
http2
.
_rst_stream
(
stream_id
)
if
cnghttp2
.
nghttp2_session_get_stream_remote_close
(
session
,
stream_id
)
==
0
:
http2
.
_rst_stream
(
stream_id
,
cnghttp2
.
NGHTTP2_NO_ERROR
)
elif
flag
!=
DATA_OK
:
return
cnghttp2
.
NGHTTP2_ERR_TEMPORAL_CALLBACK_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