Rename NGHTTP2_ERR_FRAME_TOO_LARGE as NGHTTP2_ERR_FRAME_SIZE_ERROR
This commit is contained in:
parent
5ace898392
commit
431f78f008
|
@ -250,9 +250,9 @@ typedef enum {
|
||||||
*/
|
*/
|
||||||
NGHTTP2_ERR_TEMPORAL_CALLBACK_FAILURE = -521,
|
NGHTTP2_ERR_TEMPORAL_CALLBACK_FAILURE = -521,
|
||||||
/**
|
/**
|
||||||
* The length of the frame is too large.
|
* The length of the frame is invalid, either too large or too small.
|
||||||
*/
|
*/
|
||||||
NGHTTP2_ERR_FRAME_TOO_LARGE = -522,
|
NGHTTP2_ERR_FRAME_SIZE_ERROR = -522,
|
||||||
/**
|
/**
|
||||||
* Header block inflate/deflate error.
|
* Header block inflate/deflate error.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -262,8 +262,8 @@ const char* nghttp2_strerror(int error_code)
|
||||||
return "Gzip error";
|
return "Gzip error";
|
||||||
case NGHTTP2_ERR_TEMPORAL_CALLBACK_FAILURE:
|
case NGHTTP2_ERR_TEMPORAL_CALLBACK_FAILURE:
|
||||||
return "The user callback function failed due to the temporal error";
|
return "The user callback function failed due to the temporal error";
|
||||||
case NGHTTP2_ERR_FRAME_TOO_LARGE:
|
case NGHTTP2_ERR_FRAME_SIZE_ERROR:
|
||||||
return "The length of the frame is too large";
|
return "The length of the frame is invalid";
|
||||||
case NGHTTP2_ERR_HEADER_COMP:
|
case NGHTTP2_ERR_HEADER_COMP:
|
||||||
return "Header compression/decompression error";
|
return "Header compression/decompression error";
|
||||||
case NGHTTP2_ERR_NOMEM:
|
case NGHTTP2_ERR_NOMEM:
|
||||||
|
|
|
@ -2706,7 +2706,7 @@ static int nghttp2_session_process_ctrl_frame(nghttp2_session *session)
|
||||||
session->iframe.buf,
|
session->iframe.buf,
|
||||||
session->iframe.buflen,
|
session->iframe.buflen,
|
||||||
&session->hd_inflater);
|
&session->hd_inflater);
|
||||||
} else if(session->iframe.error_code == NGHTTP2_ERR_FRAME_TOO_LARGE) {
|
} else if(session->iframe.error_code == NGHTTP2_ERR_FRAME_SIZE_ERROR) {
|
||||||
r = nghttp2_frame_unpack_headers_without_nv
|
r = nghttp2_frame_unpack_headers_without_nv
|
||||||
(&frame->headers,
|
(&frame->headers,
|
||||||
session->iframe.headbuf, sizeof(session->iframe.headbuf),
|
session->iframe.headbuf, sizeof(session->iframe.headbuf),
|
||||||
|
@ -3204,7 +3204,7 @@ ssize_t nghttp2_session_mem_recv(nghttp2_session *session,
|
||||||
/* TODO Make payloadlen configurable up to
|
/* TODO Make payloadlen configurable up to
|
||||||
NGHTTP2_MAX_FRAME_LENGTH */
|
NGHTTP2_MAX_FRAME_LENGTH */
|
||||||
if(session->iframe.payloadlen > NGHTTP2_MAX_HTTP_FRAME_LENGTH) {
|
if(session->iframe.payloadlen > NGHTTP2_MAX_HTTP_FRAME_LENGTH) {
|
||||||
session->iframe.error_code = NGHTTP2_ERR_FRAME_TOO_LARGE;
|
session->iframe.error_code = NGHTTP2_ERR_FRAME_SIZE_ERROR;
|
||||||
session->iframe.state = NGHTTP2_RECV_PAYLOAD_IGN;
|
session->iframe.state = NGHTTP2_RECV_PAYLOAD_IGN;
|
||||||
/* Make inflater fail forcibly to disallow reception of
|
/* Make inflater fail forcibly to disallow reception of
|
||||||
further HEADERS or PUSH_PROMISE */
|
further HEADERS or PUSH_PROMISE */
|
||||||
|
@ -3322,7 +3322,7 @@ ssize_t nghttp2_session_mem_recv(nghttp2_session *session,
|
||||||
connection-level window size. */
|
connection-level window size. */
|
||||||
}
|
}
|
||||||
if(session->iframe.payloadlen == session->iframe.off) {
|
if(session->iframe.payloadlen == session->iframe.off) {
|
||||||
if(session->iframe.error_code != NGHTTP2_ERR_FRAME_TOO_LARGE) {
|
if(session->iframe.error_code != NGHTTP2_ERR_FRAME_SIZE_ERROR) {
|
||||||
if(!nghttp2_frame_is_data_frame(session->iframe.headbuf)) {
|
if(!nghttp2_frame_is_data_frame(session->iframe.headbuf)) {
|
||||||
/* TODO Introduce callback which is invoked when payload is
|
/* TODO Introduce callback which is invoked when payload is
|
||||||
ignored, especially for frame too large */
|
ignored, especially for frame too large */
|
||||||
|
|
Loading…
Reference in New Issue