Commit 431f78f0 authored by Tatsuhiro Tsujikawa's avatar Tatsuhiro Tsujikawa

Rename NGHTTP2_ERR_FRAME_TOO_LARGE as NGHTTP2_ERR_FRAME_SIZE_ERROR

parent 5ace8983
......@@ -250,9 +250,9 @@ typedef enum {
*/
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.
*/
......
......@@ -262,8 +262,8 @@ const char* nghttp2_strerror(int error_code)
return "Gzip error";
case NGHTTP2_ERR_TEMPORAL_CALLBACK_FAILURE:
return "The user callback function failed due to the temporal error";
case NGHTTP2_ERR_FRAME_TOO_LARGE:
return "The length of the frame is too large";
case NGHTTP2_ERR_FRAME_SIZE_ERROR:
return "The length of the frame is invalid";
case NGHTTP2_ERR_HEADER_COMP:
return "Header compression/decompression error";
case NGHTTP2_ERR_NOMEM:
......
......@@ -2706,7 +2706,7 @@ static int nghttp2_session_process_ctrl_frame(nghttp2_session *session)
session->iframe.buf,
session->iframe.buflen,
&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
(&frame->headers,
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
NGHTTP2_MAX_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;
/* Make inflater fail forcibly to disallow reception of
further HEADERS or PUSH_PROMISE */
......@@ -3322,7 +3322,7 @@ ssize_t nghttp2_session_mem_recv(nghttp2_session *session,
connection-level window size. */
}
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)) {
/* TODO Introduce callback which is invoked when payload is
ignored, especially for frame too large */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment