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
ed390442
Commit
ed390442
authored
Jul 21, 2013
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nghttp2_session_handle_invalid_stream: Remove stream_id parameter
parent
ce47881e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
12 deletions
+7
-12
lib/nghttp2_session.c
lib/nghttp2_session.c
+7
-12
No files found.
lib/nghttp2_session.c
View file @
ed390442
...
@@ -1383,12 +1383,11 @@ static int nghttp2_session_handle_parse_error(nghttp2_session *session,
...
@@ -1383,12 +1383,11 @@ static int nghttp2_session_handle_parse_error(nghttp2_session *session,
static
int
nghttp2_session_handle_invalid_stream
static
int
nghttp2_session_handle_invalid_stream
(
nghttp2_session
*
session
,
(
nghttp2_session
*
session
,
int32_t
stream_id
,
nghttp2_frame
*
frame
,
nghttp2_frame
*
frame
,
nghttp2_error_code
error_code
)
nghttp2_error_code
error_code
)
{
{
int
r
;
int
r
;
r
=
nghttp2_session_add_rst_stream
(
session
,
stream_id
,
error_code
);
r
=
nghttp2_session_add_rst_stream
(
session
,
frame
->
hd
.
stream_id
,
error_code
);
if
(
r
!=
0
)
{
if
(
r
!=
0
)
{
return
r
;
return
r
;
}
}
...
@@ -1453,8 +1452,7 @@ int nghttp2_session_on_syn_stream_received(nghttp2_session *session,
...
@@ -1453,8 +1452,7 @@ int nghttp2_session_on_syn_stream_received(nghttp2_session *session,
nghttp2_session_call_on_request_recv
(
session
,
frame
->
hd
.
stream_id
);
nghttp2_session_call_on_request_recv
(
session
,
frame
->
hd
.
stream_id
);
}
}
}
else
{
}
else
{
r
=
nghttp2_session_handle_invalid_stream
r
=
nghttp2_session_handle_invalid_stream
(
session
,
frame
,
error_code
);
(
session
,
frame
->
hd
.
stream_id
,
frame
,
error_code
);
}
}
return
r
;
return
r
;
}
}
...
@@ -1492,8 +1490,7 @@ int nghttp2_session_on_syn_reply_received(nghttp2_session *session,
...
@@ -1492,8 +1490,7 @@ int nghttp2_session_on_syn_reply_received(nghttp2_session *session,
error_code
=
NGHTTP2_STREAM_CLOSED
;
error_code
=
NGHTTP2_STREAM_CLOSED
;
}
}
if
(
!
valid
)
{
if
(
!
valid
)
{
r
=
nghttp2_session_handle_invalid_stream
r
=
nghttp2_session_handle_invalid_stream
(
session
,
frame
,
error_code
);
(
session
,
frame
->
hd
.
stream_id
,
frame
,
error_code
);
}
}
return
r
;
return
r
;
}
}
...
@@ -1545,8 +1542,7 @@ int nghttp2_session_on_headers_received(nghttp2_session *session,
...
@@ -1545,8 +1542,7 @@ int nghttp2_session_on_headers_received(nghttp2_session *session,
error_code
=
NGHTTP2_STREAM_CLOSED
;
error_code
=
NGHTTP2_STREAM_CLOSED
;
}
}
if
(
!
valid
)
{
if
(
!
valid
)
{
r
=
nghttp2_session_handle_invalid_stream
r
=
nghttp2_session_handle_invalid_stream
(
session
,
frame
,
error_code
);
(
session
,
frame
->
hd
.
stream_id
,
frame
,
error_code
);
}
}
return
r
;
return
r
;
}
}
...
@@ -1840,7 +1836,7 @@ int nghttp2_session_on_window_update_received(nghttp2_session *session,
...
@@ -1840,7 +1836,7 @@ int nghttp2_session_on_window_update_received(nghttp2_session *session,
stream
->
window_size
)
{
stream
->
window_size
)
{
int
r
;
int
r
;
r
=
nghttp2_session_handle_invalid_stream
r
=
nghttp2_session_handle_invalid_stream
(
session
,
frame
->
hd
.
stream_id
,
frame
,
NGHTTP2_FLOW_CONTROL_ERROR
);
(
session
,
frame
,
NGHTTP2_FLOW_CONTROL_ERROR
);
return
r
;
return
r
;
}
else
{
}
else
{
stream
->
window_size
+=
frame
->
window_update
.
window_size_increment
;
stream
->
window_size
+=
frame
->
window_update
.
window_size_increment
;
...
@@ -1917,7 +1913,7 @@ static int nghttp2_session_process_ctrl_frame(nghttp2_session *session)
...
@@ -1917,7 +1913,7 @@ static int nghttp2_session_process_ctrl_frame(nghttp2_session *session)
}
}
}
else
{
}
else
{
r
=
nghttp2_session_handle_invalid_stream
r
=
nghttp2_session_handle_invalid_stream
(
session
,
frame
.
hd
.
stream_id
,
&
frame
,
NGHTTP2_PROTOCOL_ERROR
);
(
session
,
&
frame
,
NGHTTP2_PROTOCOL_ERROR
);
}
}
}
else
{
}
else
{
frame
.
headers
.
cat
=
NGHTTP2_HCAT_START_STREAM
;
frame
.
headers
.
cat
=
NGHTTP2_HCAT_START_STREAM
;
...
@@ -1927,8 +1923,7 @@ static int nghttp2_session_process_ctrl_frame(nghttp2_session *session)
...
@@ -1927,8 +1923,7 @@ static int nghttp2_session_process_ctrl_frame(nghttp2_session *session)
nghttp2_hd_end_headers
(
&
session
->
hd_inflater
);
nghttp2_hd_end_headers
(
&
session
->
hd_inflater
);
}
else
if
(
r
==
NGHTTP2_ERR_INVALID_HEADER_BLOCK
)
{
}
else
if
(
r
==
NGHTTP2_ERR_INVALID_HEADER_BLOCK
)
{
r
=
nghttp2_session_handle_invalid_stream
r
=
nghttp2_session_handle_invalid_stream
(
session
,
frame
.
hd
.
stream_id
,
&
frame
,
(
session
,
&
frame
,
nghttp2_get_status_code_from_error_code
(
r
));
nghttp2_get_status_code_from_error_code
(
r
));
/* TODO test this. It seems NGHTTP2_ERR_INVALID_HEADER_BLOCK is
/* TODO test this. It seems NGHTTP2_ERR_INVALID_HEADER_BLOCK is
not used in framing anymore. */
not used in framing anymore. */
nghttp2_frame_headers_free
(
&
frame
.
headers
);
nghttp2_frame_headers_free
(
&
frame
.
headers
);
...
...
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