Radish alpha
r
rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5
Radicle web interface
Radicle
Git
http: Fix encoding issue in raw file handler
Open rudolfs opened 1 year ago

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.

check check-visual check-unit-test check-http-client-unit-test check-radicle-httpd check-e2e check-build check-http 👉 Preview 👉 Workflow runs 👉 Branch on GitHub

4 files changed +4 -4 b3be042b dd81b59f
modified radicle-httpd/Cargo.lock
@@ -1675,7 +1675,7 @@ dependencies = [

[[package]]
name = "radicle-httpd"
-
version = "0.16.0"
+
version = "0.17.1"
dependencies = [
 "anyhow",
 "axum",
modified radicle-httpd/Cargo.toml
@@ -3,7 +3,7 @@ name = "radicle-httpd"
description = "Radicle HTTP daemon"
homepage = "https://radicle.xyz"
license = "MIT OR Apache-2.0"
-
version = "0.16.0"
+
version = "0.17.1"
authors = ["cloudhead <cloudhead@radicle.xyz>"]
edition = "2021"
default-run = "radicle-httpd"
modified radicle-httpd/src/api.rs
@@ -30,7 +30,7 @@ use crate::Options;

pub const RADICLE_VERSION: &str = env!("RADICLE_VERSION");
// This version has to be updated on every breaking change to the radicle-httpd API.
-
pub const API_VERSION: &str = "6.0.0";
+
pub const API_VERSION: &str = "6.1.0";

#[derive(Clone)]
pub struct Context {
modified radicle-httpd/src/raw.rs
@@ -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"
    };