dlr 2003/08/31 14:26:52
Modified: src/java/org/apache/velocity/servlet VelocityServlet.java
Log:
* src/java/org/apache/velocity/servlet/VelocityServlet.java
setContentType(): Corrected logic determining whether a ';' exists
in the Content-Type. The method happens to work with the previous
implementation, but only when no charset is present in the header.
Revision Changes Path
1.52 +2 -2
jakarta-velocity/src/java/org/apache/velocity/servlet/VelocityServlet.java
Index: VelocityServlet.java
===================================================================
RCS file:
/home/cvs/jakarta-velocity/src/java/org/apache/velocity/servlet/VelocityServlet.java,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -u -r1.51 -r1.52
--- VelocityServlet.java 31 Aug 2003 18:09:58 -0000 1.51
+++ VelocityServlet.java 31 Aug 2003 21:26:52 -0000 1.52
@@ -521,7 +521,7 @@
{
String contentType = defaultContentType;
int index = contentType.lastIndexOf(';') + 1;
- if (0 <= index || (index < contentType.length() &&
+ if (index <= 0 || (index < contentType.length() &&
contentType.indexOf("charset", index) == -1))
{
// Append the character encoding which we'd like to use.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]