tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kkoli...@apache.org
Subject svn commit: r1066244 - in /tomcat/trunk: java/org/apache/catalina/connector/Request.java webapps/docs/changelog.xml
Date Tue, 01 Feb 2011 22:12:19 GMT
Author: kkolinko
Date: Tue Feb  1 22:12:18 2011
New Revision: 1066244

URL: http://svn.apache.org/viewvc?rev=1066244&view=rev
Log:
Improve HTTP specification compliance

Modified:
    tomcat/trunk/java/org/apache/catalina/connector/Request.java
    tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/java/org/apache/catalina/connector/Request.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/Request.java?rev=1066244&r1=1066243&r2=1066244&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/connector/Request.java (original)
+++ tomcat/trunk/java/org/apache/catalina/connector/Request.java Tue Feb  1 22:12:18 2011
@@ -3005,7 +3005,12 @@ public class Request
             int semi = entry.indexOf(";q=");
             if (semi >= 0) {
                 try {
-                    quality = Double.parseDouble(entry.substring(semi + 3));
+                    String strQuality = entry.substring(semi + 3);
+                    if (strQuality.length() <= 5) {
+                        quality = Double.parseDouble(strQuality);
+                    } else {
+                        quality = 0.0;
+                    }
                 } catch (NumberFormatException e) {
                     quality = 0.0;
                 }

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1066244&r1=1066243&r2=1066244&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Tue Feb  1 22:12:18 2011
@@ -113,6 +113,10 @@
         to <code>false</code> in the Host where a web application is deployed.
         (markt)
       </fix>
+      <fix>
+        Improve HTTP specification compliance in support of
+        <code>Accept-Language</code> header. (kkolinko)
+      </fix>
     </changelog>
   </subsection>
   <subsection name="Coyote">



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message