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
9865b469
Commit
9865b469
authored
Feb 11, 2014
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't change state in inbound_frame_handle_pad
parent
6c40928f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
12 deletions
+10
-12
lib/nghttp2_session.c
lib/nghttp2_session.c
+10
-12
No files found.
lib/nghttp2_session.c
View file @
9865b469
...
@@ -3383,9 +3383,10 @@ static int inbound_frame_set_settings_entry(nghttp2_inbound_frame *iframe)
...
@@ -3383,9 +3383,10 @@ static int inbound_frame_set_settings_entry(nghttp2_inbound_frame *iframe)
}
}
/*
/*
* Checks PAD_HIGH and PAD_LOW flags and set next state
* Checks PAD_HIGH and PAD_LOW flags and set iframe->left and
* accordingly. If padding is set, this function returns 1. If no
* iframe->buflen accordingly. If padding is set, this function
* padding is set, this function returns 0. On error, returns -1.
* returns 1. If no padding is set, this function returns 0. On error,
* returns -1.
*/
*/
static
int
inbound_frame_handle_pad
(
nghttp2_inbound_frame
*
iframe
,
static
int
inbound_frame_handle_pad
(
nghttp2_inbound_frame
*
iframe
,
nghttp2_frame_hd
*
hd
)
nghttp2_frame_hd
*
hd
)
...
@@ -3394,13 +3395,11 @@ static int inbound_frame_handle_pad(nghttp2_inbound_frame *iframe,
...
@@ -3394,13 +3395,11 @@ static int inbound_frame_handle_pad(nghttp2_inbound_frame *iframe,
if
((
hd
->
flags
&
NGHTTP2_FLAG_PAD_LOW
)
==
0
)
{
if
((
hd
->
flags
&
NGHTTP2_FLAG_PAD_LOW
)
==
0
)
{
return
-
1
;
return
-
1
;
}
}
iframe
->
state
=
NGHTTP2_IB_READ_NBYTE
;
iframe
->
left
=
2
;
iframe
->
left
=
2
;
iframe
->
buflen
=
0
;
iframe
->
buflen
=
0
;
return
1
;
return
1
;
}
}
if
(
hd
->
flags
&
NGHTTP2_FLAG_PAD_LOW
)
{
if
(
hd
->
flags
&
NGHTTP2_FLAG_PAD_LOW
)
{
iframe
->
state
=
NGHTTP2_IB_READ_NBYTE
;
iframe
->
left
=
1
;
iframe
->
left
=
1
;
iframe
->
buflen
=
0
;
iframe
->
buflen
=
0
;
return
1
;
return
1
;
...
@@ -3507,10 +3506,11 @@ ssize_t nghttp2_session_mem_recv(nghttp2_session *session,
...
@@ -3507,10 +3506,11 @@ ssize_t nghttp2_session_mem_recv(nghttp2_session *session,
}
}
break
;
break
;
}
}
if
(
rv
==
0
)
{
if
(
rv
==
1
)
{
iframe
->
state
=
NGHTTP2_IB_READ_
DATA
;
iframe
->
state
=
NGHTTP2_IB_READ_
NBYTE
;
break
;
break
;
}
}
iframe
->
state
=
NGHTTP2_IB_READ_DATA
;
break
;
break
;
}
}
case
NGHTTP2_HEADERS
:
case
NGHTTP2_HEADERS
:
...
@@ -3527,6 +3527,7 @@ ssize_t nghttp2_session_mem_recv(nghttp2_session *session,
...
@@ -3527,6 +3527,7 @@ ssize_t nghttp2_session_mem_recv(nghttp2_session *session,
break
;
break
;
}
}
if
(
rv
==
1
)
{
if
(
rv
==
1
)
{
iframe
->
state
=
NGHTTP2_IB_READ_NBYTE
;
break
;
break
;
}
}
if
(
iframe
->
frame
.
hd
.
flags
&
NGHTTP2_FLAG_PRIORITY
)
{
if
(
iframe
->
frame
.
hd
.
flags
&
NGHTTP2_FLAG_PRIORITY
)
{
...
@@ -3909,8 +3910,7 @@ ssize_t nghttp2_session_mem_recv(nghttp2_session *session,
...
@@ -3909,8 +3910,7 @@ ssize_t nghttp2_session_mem_recv(nghttp2_session *session,
nghttp2_inbound_frame_reset
(
session
);
nghttp2_inbound_frame_reset
(
session
);
break
;
break
;
case
NGHTTP2_IB_EXPECT_CONTINUATION
:
case
NGHTTP2_IB_EXPECT_CONTINUATION
:
case
NGHTTP2_IB_IGN_CONTINUATION
:
{
case
NGHTTP2_IB_IGN_CONTINUATION
:
nghttp2_inbound_state
state_back
;
#ifdef DEBUGBUILD
#ifdef DEBUGBUILD
if
(
iframe
->
state
==
NGHTTP2_IB_EXPECT_CONTINUATION
)
{
if
(
iframe
->
state
==
NGHTTP2_IB_EXPECT_CONTINUATION
)
{
fprintf
(
stderr
,
"[IB_EXPECT_CONTINUATION]
\n
"
);
fprintf
(
stderr
,
"[IB_EXPECT_CONTINUATION]
\n
"
);
...
@@ -3947,7 +3947,6 @@ ssize_t nghttp2_session_mem_recv(nghttp2_session *session,
...
@@ -3947,7 +3947,6 @@ ssize_t nghttp2_session_mem_recv(nghttp2_session *session,
NGHTTP2_FLAG_PAD_HIGH
|
NGHTTP2_FLAG_PAD_LOW
);
NGHTTP2_FLAG_PAD_HIGH
|
NGHTTP2_FLAG_PAD_LOW
);
iframe
->
frame
.
hd
.
length
+=
cont_hd
.
length
;
iframe
->
frame
.
hd
.
length
+=
cont_hd
.
length
;
state_back
=
iframe
->
state
;
rv
=
inbound_frame_handle_pad
(
iframe
,
&
cont_hd
);
rv
=
inbound_frame_handle_pad
(
iframe
,
&
cont_hd
);
if
(
rv
<
0
)
{
if
(
rv
<
0
)
{
busy
=
1
;
busy
=
1
;
...
@@ -3960,7 +3959,7 @@ ssize_t nghttp2_session_mem_recv(nghttp2_session *session,
...
@@ -3960,7 +3959,7 @@ ssize_t nghttp2_session_mem_recv(nghttp2_session *session,
break
;
break
;
}
}
if
(
rv
==
1
)
{
if
(
rv
==
1
)
{
if
(
state_back
==
NGHTTP2_IB_EXPECT_CONTINUATION
)
{
if
(
iframe
->
state
==
NGHTTP2_IB_EXPECT_CONTINUATION
)
{
iframe
->
state
=
NGHTTP2_IB_READ_PAD_CONTINUATION
;
iframe
->
state
=
NGHTTP2_IB_READ_PAD_CONTINUATION
;
}
else
{
}
else
{
iframe
->
state
=
NGHTTP2_IB_IGN_PAD_CONTINUATION
;
iframe
->
state
=
NGHTTP2_IB_IGN_PAD_CONTINUATION
;
...
@@ -3975,7 +3974,6 @@ ssize_t nghttp2_session_mem_recv(nghttp2_session *session,
...
@@ -3975,7 +3974,6 @@ ssize_t nghttp2_session_mem_recv(nghttp2_session *session,
iframe
->
state
=
NGHTTP2_IB_IGN_HEADER_BLOCK
;
iframe
->
state
=
NGHTTP2_IB_IGN_HEADER_BLOCK
;
}
}
break
;
break
;
}
case
NGHTTP2_IB_READ_PAD_CONTINUATION
:
case
NGHTTP2_IB_READ_PAD_CONTINUATION
:
case
NGHTTP2_IB_IGN_PAD_CONTINUATION
:
case
NGHTTP2_IB_IGN_PAD_CONTINUATION
:
#ifdef DEBUGBUILD
#ifdef DEBUGBUILD
...
...
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