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
5ace8983
Commit
5ace8983
authored
Oct 27, 2013
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update error code
parent
a46ccdb1
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
8 deletions
+26
-8
lib/includes/nghttp2/nghttp2.h
lib/includes/nghttp2/nghttp2.h
+15
-3
lib/nghttp2_session.c
lib/nghttp2_session.c
+2
-2
src/app_helper.cc
src/app_helper.cc
+8
-2
tests/nghttp2_session_test.c
tests/nghttp2_session_test.c
+1
-1
No files found.
lib/includes/nghttp2/nghttp2.h
View file @
5ace8983
...
...
@@ -454,14 +454,18 @@ typedef enum {
* FLOW_CONTROL_ERROR
*/
NGHTTP2_FLOW_CONTROL_ERROR
=
3
,
/**
* SETTINGS_TIMEOUT
*/
NGHTTP2_SETTINGS_TIMEOUT
=
4
,
/**
* STREAM_CLOSED
*/
NGHTTP2_STREAM_CLOSED
=
5
,
/**
* FRAME_
TOO_LARGE
* FRAME_
SIZE_ERROR
*/
NGHTTP2_FRAME_
TOO_LARGE
=
6
,
NGHTTP2_FRAME_
SIZE_ERROR
=
6
,
/**
* REFUSED_STREAM
*/
...
...
@@ -473,7 +477,15 @@ typedef enum {
/**
* COMPRESSION_ERROR
*/
NGHTTP2_COMPRESSION_ERROR
=
9
NGHTTP2_COMPRESSION_ERROR
=
9
,
/**
* CONNECT_ERROR
*/
NGHTTP2_CONNECT_ERROR
=
10
,
/**
* ENHANCE_YOUR_CALM
*/
NGHTTP2_ENHANCE_YOUR_CALM
=
420
}
nghttp2_error_code
;
/**
...
...
lib/nghttp2_session.c
View file @
5ace8983
...
...
@@ -2363,7 +2363,7 @@ int nghttp2_session_on_settings_received(nghttp2_session *session,
if
(
frame
->
hd
.
flags
&
NGHTTP2_FLAG_ACK
)
{
if
(
frame
->
settings
.
niv
!=
0
)
{
return
nghttp2_session_handle_invalid_connection
(
session
,
frame
,
NGHTTP2_FRAME_
TOO_LARGE
);
(
session
,
frame
,
NGHTTP2_FRAME_
SIZE_ERROR
);
}
if
(
session
->
inflight_niv
==
-
1
)
{
return
nghttp2_session_handle_invalid_connection
(
session
,
frame
,
...
...
@@ -3210,7 +3210,7 @@ ssize_t nghttp2_session_mem_recv(nghttp2_session *session,
further HEADERS or PUSH_PROMISE */
session
->
hd_inflater
.
bad
=
1
;
/* Just tear down session for now */
r
=
nghttp2_session_fail_session
(
session
,
NGHTTP2_FRAME_
TOO_LARGE
);
r
=
nghttp2_session_fail_session
(
session
,
NGHTTP2_FRAME_
SIZE_ERROR
);
if
(
r
!=
0
)
{
/* FATAL */
assert
(
r
<
NGHTTP2_ERR_FATAL
);
...
...
src/app_helper.cc
View file @
5ace8983
...
...
@@ -60,16 +60,22 @@ const char* strstatus(nghttp2_error_code error_code)
return
"INTERNAL_ERROR"
;
case
NGHTTP2_FLOW_CONTROL_ERROR
:
return
"FLOW_CONTROL_ERROR"
;
case
NGHTTP2_SETTINGS_TIMEOUT
:
return
"SETTINGS_TIMEOUT"
;
case
NGHTTP2_STREAM_CLOSED
:
return
"STREAM_CLOSED"
;
case
NGHTTP2_FRAME_
TOO_LARGE
:
return
"FRAME_
TOO_LARGE
"
;
case
NGHTTP2_FRAME_
SIZE_ERROR
:
return
"FRAME_
SIZE_ERROR
"
;
case
NGHTTP2_REFUSED_STREAM
:
return
"REFUSED_STREAM"
;
case
NGHTTP2_CANCEL
:
return
"CANCEL"
;
case
NGHTTP2_COMPRESSION_ERROR
:
return
"COMPRESSION_ERROR"
;
case
NGHTTP2_CONNECT_ERROR
:
return
"CONNECT_ERROR"
;
case
NGHTTP2_ENHANCE_YOUR_CALM
:
return
"ENHANCE_YOUR_CALM"
;
default:
return
"UNKNOWN"
;
}
...
...
tests/nghttp2_session_test.c
View file @
5ace8983
...
...
@@ -358,7 +358,7 @@ void test_nghttp2_session_recv_frame_too_large(void)
item
=
nghttp2_session_get_next_ob_item
(
session
);
CU_ASSERT
(
item
!=
NULL
);
CU_ASSERT
(
NGHTTP2_GOAWAY
==
OB_CTRL_TYPE
(
item
));
CU_ASSERT
(
NGHTTP2_FRAME_
TOO_LARGE
==
OB_CTRL
(
item
)
->
goaway
.
error_code
);
CU_ASSERT
(
NGHTTP2_FRAME_
SIZE_ERROR
==
OB_CTRL
(
item
)
->
goaway
.
error_code
);
/* Check next frame can be received */
nghttp2_frame_ping_init
(
&
frame
.
ping
,
NGHTTP2_FLAG_NONE
,
NULL
);
...
...
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