mirror of
https://github.com/telemt/telemt.git
synced 2026-11-22 07:16:38 +03:00
X-Telemt-Retry-After-Ms added
This commit is contained in:
@@ -409,6 +409,10 @@ async fn diagnostic_body_pressure_does_not_claim_the_event() {
|
||||
response_header(split_response(&saturated).0, "retry-after"),
|
||||
"1"
|
||||
);
|
||||
assert_eq!(
|
||||
response_header(split_response(&saturated).0, "x-telemt-retry-after-ms"),
|
||||
"250"
|
||||
);
|
||||
drop(held);
|
||||
|
||||
let accepted = request(&listener, &runtime, retry).await;
|
||||
|
||||
@@ -46,6 +46,11 @@ pub(super) fn service_unavailable() -> HttpResponse {
|
||||
response
|
||||
.headers_mut()
|
||||
.insert(header::RETRY_AFTER, HeaderValue::from_static("1"));
|
||||
// Keep whole-second HTTP guidance for clients without the Telemt extension.
|
||||
response.headers_mut().insert(
|
||||
HeaderName::from_static("x-telemt-retry-after-ms"),
|
||||
HeaderValue::from_static("250"),
|
||||
);
|
||||
response
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user