v0.41.3_hotfix1
This commit is contained in:
1 parent
dd9ecc48f1
commit
0d0100acbc
35 files changed
+1007
-417
No files matched your search
+13
-13
@@ -62,7 +62,11 @@ async fn dispatch(state: Arc<App>, request: Request) -> Response {
|
||||
let peer = request.extensions().get::<PeerAddr>().copied();
|
||||
let local = request.extensions().get::<LocalAddr>().copied();
|
||||
let (Some(peer), Some(local)) = (peer, local) else {
|
||||
return (StatusCode::INTERNAL_SERVER_ERROR, "Missing request extension").into_response();
|
||||
return (
|
||||
StatusCode::INTERNAL_SERVER_ERROR,
|
||||
"Missing request extension",
|
||||
)
|
||||
.into_response();
|
||||
};
|
||||
forward(state, peer, local, request).await
|
||||
}
|
||||
@@ -364,18 +368,14 @@ async fn refresh_cache_once(
|
||||
pool.strip_affinity_response(&mut validation_headers);
|
||||
}
|
||||
let merged = cached.merge_validation_headers(&validation_headers);
|
||||
return context
|
||||
.state
|
||||
.cache
|
||||
.publish_revalidated(
|
||||
ticket,
|
||||
&cached,
|
||||
merged,
|
||||
&origin_validation_headers,
|
||||
&context.cache_settings,
|
||||
started.elapsed(),
|
||||
)
|
||||
.is_some();
|
||||
return context.state.cache.publish_background_revalidated(
|
||||
ticket,
|
||||
&cached,
|
||||
merged,
|
||||
&origin_validation_headers,
|
||||
&context.cache_settings,
|
||||
started.elapsed(),
|
||||
);
|
||||
}
|
||||
if origin.status() != StatusCode::OK {
|
||||
return false;
|
||||
|
||||
Reference in new issue
Block a user