Use getContentType() method instead of directly accessing the
contentType field in ResponseTrans. The method will append the charset to the content type.
This commit is contained in:
parent
0a68003361
commit
77f29e6dfd
2 changed files with 11 additions and 11 deletions
|
@ -223,7 +223,7 @@ public abstract class AbstractServletClient extends HttpServlet {
|
|||
if (trans.status > 0)
|
||||
res.setStatus (trans.status);
|
||||
res.setContentLength (trans.getContentLength ());
|
||||
res.setContentType (trans.contentType);
|
||||
res.setContentType (trans.getContentType ());
|
||||
try {
|
||||
OutputStream out = res.getOutputStream ();
|
||||
out.write (trans.getContent ());
|
||||
|
|
|
@ -179,7 +179,7 @@ public class AcmeServletClient extends HttpServlet {
|
|||
if (trans.status > 0)
|
||||
res.setStatus (trans.status);
|
||||
res.setContentLength (trans.getContentLength ());
|
||||
res.setContentType (trans.contentType);
|
||||
res.setContentType (trans.getContentType ());
|
||||
try {
|
||||
OutputStream out = res.getOutputStream ();
|
||||
out.write (trans.getContent ());
|
||||
|
|
Loading…
Add table
Reference in a new issue