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:
hns 2002-03-13 23:37:18 +00:00
parent 0a68003361
commit 77f29e6dfd
2 changed files with 11 additions and 11 deletions

View file

@ -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 ());

View file

@ -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 ());