[logback-dev] svn commit: r1230 - logback/trunk/logback-access/src/main/java/ch/qos/logback/access/spi
noreply.ceki at qos.ch
noreply.ceki at qos.ch
Tue Jan 16 16:29:36 CET 2007
Author: ceki
Date: Tue Jan 16 16:29:35 2007
New Revision: 1230
Modified:
logback/trunk/logback-access/src/main/java/ch/qos/logback/access/spi/AccessEvent.java
Log:
Header map has String values not Object
Modified: logback/trunk/logback-access/src/main/java/ch/qos/logback/access/spi/AccessEvent.java
==============================================================================
--- logback/trunk/logback-access/src/main/java/ch/qos/logback/access/spi/AccessEvent.java (original)
+++ logback/trunk/logback-access/src/main/java/ch/qos/logback/access/spi/AccessEvent.java Tue Jan 16 16:29:35 2007
@@ -1,5 +1,6 @@
package ch.qos.logback.access.spi;
+import java.io.InputStream;
import java.io.Serializable;
import java.util.Enumeration;
import java.util.HashMap;
@@ -41,7 +42,7 @@
String serverName;
String postContent;
- Map<String, Object> requestHeaderMap;
+ Map<String, String> requestHeaderMap;
Map<String, Object> requestParameterMap;
long contentLength = SENTINEL;
@@ -211,8 +212,15 @@
return httpRequest.getHeaderNames();
}
+ public Map<String, String> requestHeaderMap() {
+ if(requestHeaderMap == null) {
+ buildRequestHeaderMap();
+ }
+ return requestHeaderMap;
+ }
+
public void buildRequestHeaderMap() {
- requestHeaderMap = new HashMap<String, Object>();
+ requestHeaderMap = new HashMap<String, String>();
Enumeration e = httpRequest.getHeaderNames();
if (e == null) {
return;
@@ -312,12 +320,12 @@
return postContent;
}
-// try {
-// InputStream in = httpRequest.getInputStream();
-// postContent = Util.readToString(in);
-// } catch (Exception ex) {
-// // do nothing
-// }
+ try {
+ InputStream in = httpRequest.getInputStream();
+ postContent = Util.readToString(in);
+ } catch (Exception ex) {
+ ex.printStackTrace();
+ }
if (postContent == null || postContent.length() == 0) {
postContent = NA;
}
More information about the logback-dev
mailing list