[logback-dev] [GIT] Logback: the generic, reliable, fast and flexible logging framework. branch, master, updated. v0.9.18-15-g382f13d
added by portage for gitosis-gentoo
git-noreply at pixie.qos.ch
Tue Feb 2 00:25:40 CET 2010
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Logback: the generic, reliable, fast and flexible logging framework.".
The branch, master has been updated
via 382f13d26b9718c7a5c3a467fcda487016dd3a17 (commit)
from 5ca0580bc65b84cc7ee444abf1fda2fcf4e60f60 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.qos.ch/gitweb/?p=logback.git;a=commit;h=382f13d26b9718c7a5c3a467fcda487016dd3a17
http://github.com/ceki/logback/commit/382f13d26b9718c7a5c3a467fcda487016dd3a17
commit 382f13d26b9718c7a5c3a467fcda487016dd3a17
Author: Ceki Gulcu <ceki at qos.ch>
Date: Tue Feb 2 00:23:22 2010 +0100
Request header names in AccessEvent (logback-access) are now stored in
a case insensitive way as specified in RFC 2616. This prevents
compatibility issues, in particular with recent versions of Tomcat
whcih store request header names in lower-case.
diff --git a/logback-access/pom.xml b/logback-access/pom.xml
index d9b23b8..ffb1d14 100644
--- a/logback-access/pom.xml
+++ b/logback-access/pom.xml
@@ -49,7 +49,7 @@
</dependency>
<dependency>
- <groupId>tomcat</groupId>
+ <groupId>org.apache.tomcat</groupId>
<artifactId>catalina</artifactId>
<scope>compile</scope>
<optional>true</optional>
diff --git a/logback-access/src/main/java/ch/qos/logback/access/spi/AccessEvent.java b/logback-access/src/main/java/ch/qos/logback/access/spi/AccessEvent.java
index 3f50a60..48621e1 100644
--- a/logback-access/src/main/java/ch/qos/logback/access/spi/AccessEvent.java
+++ b/logback-access/src/main/java/ch/qos/logback/access/spi/AccessEvent.java
@@ -19,6 +19,7 @@ import java.util.Enumeration;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
+import java.util.TreeMap;
import java.util.Vector;
import javax.servlet.http.Cookie;
@@ -228,6 +229,7 @@ public class AccessEvent implements Serializable {
public String getRequestHeader(String key) {
String result = null;
+ key = key.toLowerCase();
if (requestHeaderMap == null) {
if (httpRequest != null) {
buildRequestHeaderMap();
@@ -251,7 +253,6 @@ public class AccessEvent implements Serializable {
return list.elements();
}
return httpRequest.getHeaderNames();
-
}
public Map<String, String> getRequestHeaderMap() {
@@ -262,7 +263,9 @@ public class AccessEvent implements Serializable {
}
public void buildRequestHeaderMap() {
- requestHeaderMap = new HashMap<String, String>();
+ // according to RFC 2616 header names are case insensitive
+ // latest versions of Tomcat return header names in lower-case
+ requestHeaderMap = new TreeMap<String, String>(String.CASE_INSENSITIVE_ORDER);
Enumeration e = httpRequest.getHeaderNames();
if (e == null) {
return;
diff --git a/logback-access/src/main/java/ch/qos/logback/access/spi/ServerAdapter.java b/logback-access/src/main/java/ch/qos/logback/access/spi/ServerAdapter.java
index 1911474..17f8a56 100644
--- a/logback-access/src/main/java/ch/qos/logback/access/spi/ServerAdapter.java
+++ b/logback-access/src/main/java/ch/qos/logback/access/spi/ServerAdapter.java
@@ -26,9 +26,5 @@ public interface ServerAdapter {
long getContentLength();
int getStatusCode();
-// String getResponseHeader(String key);
-// List<String> getResponseHeaderNameList();
-// Map<String, String> getResponseHeaderMap();
-
Map<String, String> buildResponseHeaderMap();
}
diff --git a/logback-access/src/main/java/ch/qos/logback/access/tomcat/TomcatServerAdapter.java b/logback-access/src/main/java/ch/qos/logback/access/tomcat/TomcatServerAdapter.java
index 5fab333..85e0670 100644
--- a/logback-access/src/main/java/ch/qos/logback/access/tomcat/TomcatServerAdapter.java
+++ b/logback-access/src/main/java/ch/qos/logback/access/tomcat/TomcatServerAdapter.java
@@ -53,7 +53,4 @@ public class TomcatServerAdapter implements ServerAdapter {
}
return responseHeaderMap;
}
-
-
-
}
diff --git a/logback-site/src/site/pages/news.html b/logback-site/src/site/pages/news.html
index b11639d..8dfab6b 100644
--- a/logback-site/src/site/pages/news.html
+++ b/logback-site/src/site/pages/news.html
@@ -28,7 +28,7 @@
<hr width="80%" align="center" />
- <h3>January 2010 - Release of version 0.9.19</h3>
+ <h3>February 2010 - Release of version 0.9.19</h3>
<p>Added <a
href="manual/appenders.html#OnMarkerEvaluator">OnMarkerEvaluator</a>
@@ -37,6 +37,12 @@
an outgoing email message when an event matches user-specified
marker.</p>
+ <p>Request header names in AccessEvent (logback-access) are now
+ stored in a case insensitive way as specified in RFC 2616. This
+ prevents compatibility issues, in particular with recent versions
+ of Tomcat whcih store request header names in lower-case.</p>
+
+
<hr width="80%" align="center" />
<h3>3rd of December 2009 - Release of version 0.9.18</h3>
diff --git a/pom.xml b/pom.xml
index 5d25438..2af4ff3 100755
--- a/pom.xml
+++ b/pom.xml
@@ -94,9 +94,9 @@
<version>1.8.0.7</version>
</dependency>
<dependency>
- <groupId>tomcat</groupId>
+ <groupId>org.apache.tomcat</groupId>
<artifactId>catalina</artifactId>
- <version>5.5.15</version>
+ <version>6.0.20</version>
</dependency>
<dependency>
<groupId>org.mortbay.jetty</groupId>
-----------------------------------------------------------------------
Summary of changes:
logback-access/pom.xml | 2 +-
.../ch/qos/logback/access/spi/AccessEvent.java | 7 +++++--
.../ch/qos/logback/access/spi/ServerAdapter.java | 4 ----
.../logback/access/tomcat/TomcatServerAdapter.java | 3 ---
logback-site/src/site/pages/news.html | 8 +++++++-
pom.xml | 4 ++--
6 files changed, 15 insertions(+), 13 deletions(-)
hooks/post-receive
--
Logback: the generic, reliable, fast and flexible logging framework.
More information about the logback-dev
mailing list