Undertow总是在Content-Type头中添加字符集,即使它不是文本MIME类型



如果我尝试在servlet中将内容类型设置为"image/jpg"

response.setContentType("image/jpg")

我得到

Content-Type: image/jpg;charset=ISO-8859-1

默认的servlet工作得很好。

我怎样才能摆脱非文本mime类型的字符集?

问题是我使用了respo . getwwriter()而不是respo . getoutputstream()来提供图像

相关内容

最新更新