You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by la...@apache.org on 2003/02/17 02:54:00 UTC
cvs commit: jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat3 Tomcat3Response.java
larryi 2003/02/16 17:54:00
Modified: coyote/src/java/org/apache/coyote/tomcat3
Tomcat3Response.java
Log:
Add overrides to keep Tomcat's and Coyote's local and
Revision Changes Path
1.7 +24 -0 jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat3/Tomcat3Response.java
Index: Tomcat3Response.java
===================================================================
RCS file: /home/cvs/jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat3/Tomcat3Response.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- Tomcat3Response.java 4 Jun 2002 03:09:56 -0000 1.6
+++ Tomcat3Response.java 17 Feb 2003 01:54:00 -0000 1.7
@@ -175,4 +175,28 @@
coyoteResponse.acknowledge();
acknowledged=true;
}
+
+ public void setLocale(Locale locale) {
+ if (locale == null || included) {
+ return; // throw an exception?
+ }
+ this.locale = locale;
+ coyoteResponse.setLocale(locale);
+ contentLanguage = coyoteResponse.getContentLanguage();
+ // maintain Tomcat 3.3 behavior by setting the header too
+ // and by not trying to guess the characterEncoding
+ headers.setValue("Content-Language").setString(contentLanguage);
+ }
+
+ public void setContentType(String contentType) {
+ if (included) {
+ return;
+ }
+ coyoteResponse.setContentType(contentType);
+ this.contentType = coyoteResponse.getContentType();
+ this.characterEncoding = coyoteResponse.getCharacterEncoding();
+ // maintain Tomcat 3.3 behavior by setting the header too
+ headers.setValue("Content-Type").setString(contentType);
+ }
+
}
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org