mirror of
https://github.com/nghttp2/nghttp2.git
synced 2025-12-10 12:08:53 +08:00
src: Implement per-frame DATA compression
Currently, nghttpd server only compresses files whose extensions are one of .html, .js, .css and .txt. nghttp advertises its support of per-frame compression in SETTINGS frame. To implement this feature, we added 2 public API: nghttp2_session_get_remote_settings() and nghttp2_gzip_inflate_finished().
This commit is contained in:
@@ -5779,6 +5779,16 @@ int32_t nghttp2_session_get_stream_remote_window_size(nghttp2_session* session,
|
||||
return nghttp2_session_next_data_read(session, stream);
|
||||
}
|
||||
|
||||
uint32_t nghttp2_session_get_remote_settings(nghttp2_session *session,
|
||||
nghttp2_settings_id id)
|
||||
{
|
||||
if(id > NGHTTP2_SETTINGS_MAX) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return session->remote_settings[id];
|
||||
}
|
||||
|
||||
int nghttp2_session_upgrade(nghttp2_session *session,
|
||||
const uint8_t *settings_payload,
|
||||
size_t settings_payloadlen,
|
||||
|
||||
Reference in New Issue
Block a user