Remove charset=utf-8 from ACME certificate requests

This commit is contained in:
Herman Slatman 2022-11-09 19:57:50 +01:00
parent e0215e7243
commit 817edcbba5
No known key found for this signature in database
GPG key ID: F4D8A44EA0A75A4F
2 changed files with 2 additions and 2 deletions

View file

@ -394,6 +394,6 @@ func GetCertificate(w http.ResponseWriter, r *http.Request) {
}
api.LogCertificate(w, cert.Leaf)
w.Header().Set("Content-Type", "application/pem-certificate-chain; charset=utf-8")
w.Header().Set("Content-Type", "application/pem-certificate-chain")
w.Write(certBytes)
}

View file

@ -514,7 +514,7 @@ func TestHandler_GetCertificate(t *testing.T) {
assert.Equals(t, res.Header["Content-Type"], []string{"application/problem+json"})
} else {
assert.Equals(t, bytes.TrimSpace(body), bytes.TrimSpace(certBytes))
assert.Equals(t, res.Header["Content-Type"], []string{"application/pem-certificate-chain; charset=utf-8"})
assert.Equals(t, res.Header["Content-Type"], []string{"application/pem-certificate-chain"})
}
})
}