Remove NGHTTP2_OPT_MAX_RECV_CTRL_FRAME_BUFFER option

This commit is contained in:
Tatsuhiro Tsujikawa 2013-07-20 00:24:25 +09:00
parent b5810479a4
commit aa4df35a10
4 changed files with 0 additions and 28 deletions

View File

@ -1012,11 +1012,6 @@ typedef enum {
* `nghttp2_submit_window_update`.
*/
NGHTTP2_OPT_NO_AUTO_WINDOW_UPDATE = 1,
/**
* This option sets maximum receive buffer size for incoming control
* frame.
*/
NGHTTP2_OPT_MAX_RECV_CTRL_FRAME_BUFFER = 2
} nghttp2_opt;
/**
@ -1037,11 +1032,6 @@ typedef enum {
* WINDOW_UPDATE using `nghttp2_submit_window_update`. This option
* defaults to 0.
*
* :enum:`NGHTTP2_OPT_MAX_RECV_CTRL_FRAME_BUFFER`
* The |optval| must be a pointer to ``uint32_t``. The |*optval|
* must be in the range [(1 << 13), (1 << 24)-1], inclusive. This
* option defaults to (1 << 24)-1.
*
* This function returns 0 if it succeeds, or one of the following
* negative error codes:
*

View File

@ -142,8 +142,6 @@ static int nghttp2_session_new(nghttp2_session **session_ptr,
(*session_ptr)->goaway_flags = NGHTTP2_GOAWAY_NONE;
(*session_ptr)->last_stream_id = 0;
(*session_ptr)->max_recv_ctrl_frame_buf = NGHTTP2_MAX_FRAME_SIZE;
r = nghttp2_hd_deflate_init(&(*session_ptr)->hd_deflater, side);
if(r != 0) {
goto fail_hd_deflater;
@ -2554,18 +2552,6 @@ int nghttp2_session_set_option(nghttp2_session *session,
return NGHTTP2_ERR_INVALID_ARGUMENT;
}
break;
case NGHTTP2_OPT_MAX_RECV_CTRL_FRAME_BUFFER:
if(optlen == sizeof(uint32_t)) {
uint32_t intval = *(uint32_t*)optval;
if((1 << 13) <= intval && intval < (1 << 24)) {
session->max_recv_ctrl_frame_buf = intval;
} else {
return NGHTTP2_ERR_INVALID_ARGUMENT;
}
} else {
return NGHTTP2_ERR_INVALID_ARGUMENT;
}
break;
default:
return NGHTTP2_ERR_INVALID_ARGUMENT;
}

View File

@ -186,8 +186,6 @@ struct nghttp2_session {
/* Option flags. This is bitwise-OR of 0 or more of nghttp2_optmask. */
uint32_t opt_flags;
/* Maxmum size of buffer to use when receving control frame. */
uint32_t max_recv_ctrl_frame_buf;
nghttp2_session_callbacks callbacks;
void *user_data;

View File

@ -347,8 +347,6 @@ void test_nghttp2_session_recv(void)
/* Some tests for frame too large */
nghttp2_session_server_new(&session, &callbacks, &user_data);
/* made max buffer small to cause error intentionally */
session->max_recv_ctrl_frame_buf = 8;
/* Receive PING with too large payload */
nghttp2_frame_ping_init(&frame.ping, NGHTTP2_FLAG_NONE, NULL);