mirror of
https://github.com/apache/struts.git
synced 2026-08-11 01:27:14 +00:00
WW-3187
Small refactoring git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@817366 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -237,16 +237,11 @@ public class StreamResult extends StrutsResultSupport {
|
||||
throw new IllegalArgumentException(msg);
|
||||
}
|
||||
|
||||
/*
|
||||
if (contentCharSet != null && contentCharSet.startsWith("${")) {
|
||||
contentCharSet = (String)invocation.getStack().findValue(contentCharSet, String.class);
|
||||
}
|
||||
*/
|
||||
// Find the Response in context
|
||||
HttpServletResponse oResponse = (HttpServletResponse) invocation.getInvocationContext().get(HTTP_RESPONSE);
|
||||
|
||||
// Set the content type
|
||||
if (contentCharSet != null ) {
|
||||
if (contentCharSet != null && ! contentCharSet.equals("")) {
|
||||
oResponse.setContentType(conditionalParse(contentType, invocation)+";charset="+contentCharSet);
|
||||
}
|
||||
else {
|
||||
@@ -339,6 +334,9 @@ public class StreamResult extends StrutsResultSupport {
|
||||
if (contentCharSet != null ) {
|
||||
contentCharSet = conditionalParse(contentCharSet, invocation);
|
||||
}
|
||||
else {
|
||||
contentCharSet = stack.findString("contentCharSet");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user