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
7522d50d
Commit
7522d50d
authored
Apr 05, 2015
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nghttpd, tiny-nghttpd: No need to check existence of stream
The stream existence is guaranteed by library as of
cc03a12b
.
parent
cc03a12b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
14 deletions
+2
-14
examples/tiny-nghttpd.c
examples/tiny-nghttpd.c
+2
-8
src/HttpServer.cc
src/HttpServer.cc
+0
-6
No files found.
examples/tiny-nghttpd.c
View file @
7522d50d
...
...
@@ -660,17 +660,11 @@ static void stream_error(connection *conn, int32_t stream_id,
static
int
send_data_callback
(
nghttp2_session
*
session
_U_
,
nghttp2_frame
*
frame
,
const
uint8_t
*
framehd
,
size_t
length
,
nghttp2_data_source
*
source
_U_
,
size_t
length
,
nghttp2_data_source
*
source
,
void
*
user_data
)
{
connection
*
conn
=
user_data
;
uint8_t
*
p
=
conn
->
buf
.
last
;
stream
*
strm
;
strm
=
nghttp2_session_get_stream_user_data
(
session
,
frame
->
hd
.
stream_id
);
if
(
!
strm
)
{
return
NGHTTP2_ERR_TEMPORAL_CALLBACK_FAILURE
;
}
stream
*
strm
=
source
->
ptr
;
/* We never use padding in this program */
assert
(
frame
->
data
.
padlen
==
0
);
...
...
src/HttpServer.cc
View file @
7522d50d
...
...
@@ -1218,12 +1218,6 @@ int send_data_callback(nghttp2_session *session, nghttp2_frame *frame,
const
uint8_t
*
framehd
,
size_t
length
,
nghttp2_data_source
*
source
,
void
*
user_data
)
{
auto
hd
=
static_cast
<
Http2Handler
*>
(
user_data
);
auto
stream
=
hd
->
get_stream
(
frame
->
hd
.
stream_id
);
if
(
!
stream
)
{
return
NGHTTP2_ERR_TEMPORAL_CALLBACK_FAILURE
;
}
auto
wb
=
hd
->
get_wb
();
auto
padlen
=
frame
->
data
.
padlen
;
...
...
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