1
如果我尝试设置内容类型为“图像/ JPG”在servlet暗潮随时添加字符集到Content-Type头,即使它不是一个文本MIME类型
response.setContentType("image/jpg")
我得到
Content-Type: image/jpg;charset=ISO-8859-1
相反,默认的servlet运行良好。
如何摆脱非文本MIME类型的字符集?
如果我尝试设置内容类型为“图像/ JPG”在servlet暗潮随时添加字符集到Content-Type头,即使它不是一个文本MIME类型
response.setContentType("image/jpg")
我得到
Content-Type: image/jpg;charset=ISO-8859-1
相反,默认的servlet运行良好。
如何摆脱非文本MIME类型的字符集?
问题是我用resp.getWriter()代替resp.getOutputStream()来提供图像。