mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-30 22:15:20 +00:00
DoH: Add isc_nm_set_min_answer_ttl()
This commit adds an isc_nm_set_min_answer_ttl() function which is intended to to be used to give a hint to the underlying transport regarding the answer TTL. The interface is intentionally kept generic because over time more transports might benefit from this functionality, but currently it is intended for DoH to set "max-age" value within "Cache-Control" HTTP header (as recommended in the RFC8484, section 5.1 "Cache Interaction"). It is no-op for other DNS transports for the time being.
This commit is contained in:
@@ -815,12 +815,16 @@ typedef struct isc_nmsocket_h2 {
|
||||
/* maximum concurrent streams (server-side) */
|
||||
uint32_t max_concurrent_streams;
|
||||
|
||||
uint32_t min_ttl; /* used to set "max-age" in responses */
|
||||
|
||||
isc_http_request_type_t request_type;
|
||||
isc_http_scheme_type_t request_scheme;
|
||||
|
||||
size_t content_length;
|
||||
char clenbuf[128];
|
||||
|
||||
char cache_control_buf[128];
|
||||
|
||||
int headers_error_code;
|
||||
size_t headers_data_processed;
|
||||
|
||||
@@ -1706,6 +1710,9 @@ isc__nm_http_bad_request(isc_nmhandle_t *handle);
|
||||
* socket
|
||||
*/
|
||||
|
||||
void
|
||||
isc__nm_http_set_maxage(isc_nmhandle_t *handle, const uint32_t ttl);
|
||||
|
||||
void
|
||||
isc__nm_async_httpsend(isc__networker_t *worker, isc__netievent_t *ev0);
|
||||
|
||||
|
Reference in New Issue
Block a user