Skip to content

Commit

Permalink
http: Fix encoding issue in raw file handler
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
rudolfs committed Nov 8, 2024
1 parent b3be042 commit 9d981f9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion radicle-httpd/src/raw.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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"
};
Expand Down

0 comments on commit 9d981f9

Please sign in to comment.