Adding the patch

This commit is contained in:
david knox 2011-02-02 16:34:58 -07:00
parent 0e9407e9b0
commit a1884b9437

View File

@ -0,0 +1,18 @@
--- ./java/org/apache/catalina/connector/Request.java.orig 2011-02-02 15:50:25.623469439 -0700
+++ ./java/org/apache/catalina/connector/Request.java 2011-02-02 15:51:58.832219055 -0700
@@ -2717,8 +2717,14 @@
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;
}
entry = entry.substring(0, semi);