π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Prepare dependency updates
ente-agent[bot]f8f53c600933
diff --git a/rust/crates/assets/src/download.rs b/rust/crates/assets/src/download.rsindex 24ed7606c0..f7586beca6 100644--- a/rust/crates/assets/src/download.rs+++ b/rust/crates/assets/src/download.rs@@ -1975,16 +1975,25 @@ mod tests {let bytes = Arc::clone(&bytes);let active = Arc::clone(&active);let max_active = Arc::clone(&max_active);- TestServer::spawn(move |stream| {- let current = active.fetch_add(1, Ordering::SeqCst) + 1;- max_active.fetch_max(current, Ordering::SeqCst);- thread::sleep(Duration::from_millis(50));- handle_no_range_test_request(- stream,- Arc::clone(&bytes),- Arc::new(AtomicUsize::new(0)),+ TestServer::spawn(move |mut stream| {+ let Some(request) = read_test_request(&stream) else {+ return;+ };+ let is_get = request.line.starts_with("GET ");+ if is_get {+ let current = active.fetch_add(1, Ordering::SeqCst) + 1;+ max_active.fetch_max(current, Ordering::SeqCst);+ thread::sleep(Duration::from_millis(50));+ }+ let response = format!(+ "HTTP/1.1 200 OK\r\nContent-Length: {}\r\nConnection: close\r\n\r\n",+ bytes.len());- active.fetch_sub(1, Ordering::SeqCst);+ let _ = stream.write_all(response.as_bytes());+ if is_get {+ let _ = stream.write_all(bytes.as_slice());+ active.fetch_sub(1, Ordering::SeqCst);+ }})};