Merge pull request #1172 from smallstep/herman/remove-acme-cert-charset

Remove `charset=utf-8` from ACME certificate requests
This commit is contained in:
Herman Slatman 2022-11-10 23:32:48 +01:00 committed by GitHub
commit 1f19b8ec5e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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"})
}
})
}