Check session side first

This commit is contained in:
Tatsuhiro Tsujikawa 2022-06-16 19:50:29 +09:00
parent 534284477e
commit ffa50c12b1

View File

@ -681,14 +681,14 @@ int nghttp2_submit_priority_update(nghttp2_session *session, uint8_t flags,
mem = &session->mem;
if (session->remote_settings.no_rfc7540_priorities == 0) {
return 0;
}
if (session->server) {
return NGHTTP2_ERR_INVALID_STATE;
}
if (session->remote_settings.no_rfc7540_priorities == 0) {
return 0;
}
if (stream_id == 0 || 4 + field_value_len > NGHTTP2_MAX_PAYLOADLEN) {
return NGHTTP2_ERR_INVALID_ARGUMENT;
}