We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
asset
1 parent eda5713 commit 04fd3a7Copy full SHA for 04fd3a7
.changes/asset-protocol-head-empty-body.md
@@ -0,0 +1,5 @@
1
+---
2
+"tauri": patch:bug
3
4
+
5
+Respond with empty body for `HEAD` requests to `asset` protocol
crates/tauri/src/protocol/asset.rs
@@ -199,6 +199,10 @@ fn get_response(
199
})?;
200
resp.body(buf.into())
201
}
202
+ } else if request.method() == http::Method::HEAD {
203
+ // if the HEAD method is used, we should not return a body
204
+ resp = resp.header(CONTENT_LENGTH, len);
205
+ resp.body(Vec::new().into())
206
} else {
207
// avoid reading the file if we already read it
208
// as part of mime type detection
0 commit comments