From 67a584b420e6048d17c1b8e6d81d2464e23d190d Mon Sep 17 00:00:00 2001 From: Dessalines Date: Tue, 3 Dec 2024 23:13:05 -0500 Subject: [PATCH] Removing comment lines. --- crates/api_common/src/request.rs | 3 --- 1 file changed, 3 deletions(-) diff --git a/crates/api_common/src/request.rs b/crates/api_common/src/request.rs index 9b651a871..c6f86b806 100644 --- a/crates/api_common/src/request.rs +++ b/crates/api_common/src/request.rs @@ -89,7 +89,6 @@ pub async fn fetch_link_metadata(url: &Url, context: &LemmyContext) -> LemmyResu // https://github.com/LemmyNet/lemmy/issues/1964 // So we want to do deep inspection of the actually returned bytes but need to be careful // not spend too much time parsing binary data as HTML - // only take first bytes regardless of how many bytes the server returns let html_bytes = collect_bytes_until_limit(response, bytes_to_fetch).await?; extract_opengraph_data(&html_bytes, url) @@ -105,8 +104,6 @@ pub async fn fetch_link_metadata(url: &Url, context: &LemmyContext) -> LemmyResu if is_octet_type { // Don't need to fetch as much data for this as we do with opengraph let octet_bytes = collect_bytes_until_limit(response, 512).await?; - // content_type = infer::get(&octet_bytes).or(&content_type, |t| - // t.mime_type().parse().ok()); content_type = infer::get(&octet_bytes).map_or(content_type, |t| t.mime_type().parse().ok()); }