mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-16 03:40:37 +08:00
http: Fix encoding issue in raw file handler
Turns out "content-type: text; charset=utf-8" wasn't valid, it had to be "content-type: text/plain; charset=utf-8" for browsers to recognise it properly.
This commit is contained in:
@@ -158,7 +158,7 @@ fn blob_response(
|
||||
MIMES
|
||||
.binary_search_by(|(k, _)| k.cmp(&ext))
|
||||
.map(|k| MIMES[k].1)
|
||||
.unwrap_or("text; charset=utf-8")
|
||||
.unwrap_or("text/plain; charset=utf-8")
|
||||
} else {
|
||||
"application/octet-stream"
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user