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
5c6ef84b
Commit
5c6ef84b
authored
Aug 28, 2013
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use COMPRESSION_ERROR if the cause of error comes from compressor
parent
83b0c89e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
14 deletions
+7
-14
lib/nghttp2_session.c
lib/nghttp2_session.c
+7
-14
No files found.
lib/nghttp2_session.c
View file @
5c6ef84b
...
...
@@ -2375,11 +2375,11 @@ int nghttp2_session_on_window_update_received(nghttp2_session *session,
return
0
;
}
static
int
nghttp2_get_status_code_from
_error_code
(
int
lib_error_code
)
static
int
get_error_code_from_lib
_error_code
(
int
lib_error_code
)
{
switch
(
lib_error_code
)
{
case
(
NGHTTP2_ERR_FRAME_TOO_LARGE
)
:
return
NGHTTP2_
FRAME_TOO_LARGE
;
case
NGHTTP2_ERR_HEADER_COMP
:
return
NGHTTP2_
COMPRESSION_ERROR
;
default:
return
NGHTTP2_PROTOCOL_ERROR
;
}
...
...
@@ -2440,16 +2440,9 @@ static int nghttp2_session_process_ctrl_frame(nghttp2_session *session)
}
nghttp2_frame_headers_free
(
&
frame
.
headers
);
nghttp2_hd_end_headers
(
&
session
->
hd_inflater
);
}
else
if
(
r
==
NGHTTP2_ERR_INVALID_HEADER_BLOCK
)
{
r
=
nghttp2_session_handle_invalid_stream
(
session
,
&
frame
,
nghttp2_get_status_code_from_error_code
(
r
));
/* TODO test this. It seems NGHTTP2_ERR_INVALID_HEADER_BLOCK is
not used in framing anymore. */
nghttp2_frame_headers_free
(
&
frame
.
headers
);
nghttp2_hd_end_headers
(
&
session
->
hd_inflater
);
}
else
if
(
nghttp2_is_non_fatal
(
r
))
{
r
=
nghttp2_session_handle_parse_error
(
session
,
type
,
r
,
NGHTTP2_PROTOCOL_ERROR
);
r
=
nghttp2_session_handle_parse_error
(
session
,
type
,
r
,
get_error_code_from_lib_error_code
(
r
)
);
}
break
;
case
NGHTTP2_PRIORITY
:
...
...
@@ -2510,8 +2503,8 @@ static int nghttp2_session_process_ctrl_frame(nghttp2_session *session)
nghttp2_frame_push_promise_free
(
&
frame
.
push_promise
);
nghttp2_hd_end_headers
(
&
session
->
hd_inflater
);
}
else
if
(
nghttp2_is_non_fatal
(
r
))
{
r
=
nghttp2_session_handle_parse_error
(
session
,
type
,
r
,
NGHTTP2_PROTOCOL_ERROR
);
r
=
nghttp2_session_handle_parse_error
(
session
,
type
,
r
,
get_error_code_from_lib_error_code
(
r
)
);
}
break
;
case
NGHTTP2_PING
:
...
...
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