Don't set select_padding_callback if padding_boundary is 0 or not set
This commit is contained in:
parent
3144bcbe20
commit
39fe7a5cfa
|
@ -988,7 +988,9 @@ void fill_callback(nghttp2_session_callbacks& callbacks, const Config *config)
|
||||||
callbacks.on_data_chunk_recv_callback = on_data_chunk_recv_callback;
|
callbacks.on_data_chunk_recv_callback = on_data_chunk_recv_callback;
|
||||||
callbacks.on_header_callback = on_header_callback;
|
callbacks.on_header_callback = on_header_callback;
|
||||||
callbacks.on_begin_headers_callback = on_begin_headers_callback;
|
callbacks.on_begin_headers_callback = on_begin_headers_callback;
|
||||||
|
if(config->padding_boundary) {
|
||||||
callbacks.select_padding_callback = select_padding_callback;
|
callbacks.select_padding_callback = select_padding_callback;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
|
|
|
@ -1598,7 +1598,9 @@ int run(char **uris, int n)
|
||||||
}
|
}
|
||||||
callbacks.on_data_chunk_recv_callback = on_data_chunk_recv_callback;
|
callbacks.on_data_chunk_recv_callback = on_data_chunk_recv_callback;
|
||||||
callbacks.on_header_callback = on_header_callback;
|
callbacks.on_header_callback = on_header_callback;
|
||||||
|
if(config.padding_boundary) {
|
||||||
callbacks.select_padding_callback = select_padding_callback;
|
callbacks.select_padding_callback = select_padding_callback;
|
||||||
|
}
|
||||||
|
|
||||||
std::string prev_scheme;
|
std::string prev_scheme;
|
||||||
std::string prev_host;
|
std::string prev_host;
|
||||||
|
|
Loading…
Reference in New Issue