0.34.6_repo_cleanup
This commit is contained in:
1 parent
ce1a90397c
commit
133d2f0f91
273 files changed
+5969
-6926
No files matched your search
Vendored
+9
-7
@@ -170,10 +170,15 @@ impl Cache {
|
||||
Some(validators) => validators.last_modified.clone(),
|
||||
None => headers.get("last-modified").cloned(),
|
||||
};
|
||||
let transformed = parts.extensions.get::<crate::transform::Applied>().is_some();
|
||||
// A transformed, fully buffered body normally arrives as one owned
|
||||
// frame. Do not allocate a second fill buffer before inspecting it.
|
||||
let initial_capacity = if transformed { 0 } else { fill_size.min(64 * 1024) };
|
||||
let transformed = parts
|
||||
.extensions
|
||||
.get::<crate::transform::Applied>()
|
||||
.is_some();
|
||||
let initial_capacity = if transformed {
|
||||
0
|
||||
} else {
|
||||
fill_size.min(64 * 1024)
|
||||
};
|
||||
let Some(mut fill_gauge) = FillGauge::new(self.clone(), initial_capacity, settings) else {
|
||||
self.counters.rejected_fills.fetch_add(1, Ordering::Relaxed);
|
||||
self.record_reason(&ticket.scope, &ticket.domain, "hot_memory_pressure");
|
||||
@@ -205,9 +210,6 @@ impl Cache {
|
||||
_permit: permit,
|
||||
_fill_leader: fill_leader,
|
||||
};
|
||||
// A genuinely finished body (including an empty local file) may never
|
||||
// be polled by Hyper. EOS is the proof here, not Content-Length alone;
|
||||
// finish still enforces expected length, privacy and ticket validity.
|
||||
if body.is_end_stream() {
|
||||
candidate.finish();
|
||||
return Response::from_parts(parts, body);
|
||||
|
||||
Reference in new issue
Block a user