Skip to content

Commit bc56e49

Browse files
committed
fix(web): Early return on no content type
1 parent b62d78c commit bc56e49

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

plugins/src/web/mod.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,8 +209,7 @@ async fn fetch_favicon(url: &str, favicon_path: &Path, client: &Client) -> Optio
209209
let content_type = response
210210
.headers()
211211
.get(reqwest::header::CONTENT_TYPE)
212-
.and_then(|header| header.to_str().ok())
213-
.unwrap();
212+
.and_then(|header| header.to_str().ok())?;
214213

215214
if !ALLOWED_FAVICON_MIME.contains(&content_type) {
216215
tracing::error!(

0 commit comments

Comments
 (0)