Check session side first

This commit is contained in:
Tatsuhiro Tsujikawa 2022-06-16 19:50:29 +09:00
parent 534284477e
commit ffa50c12b1
1 changed files with 4 additions and 4 deletions

View File

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