changeset 833:8ee72433bb8f stream

logs more request and response headers. unsure about last-modified response.
author robcast
date Tue, 01 Mar 2011 10:14:29 +0100
parents 30037e93ec2a
children c07c21ac78f9
files servlet/src/digilib/servlet/Scaler.java servlet/src/digilib/servlet/ServletOps.java
diffstat 2 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/servlet/src/digilib/servlet/Scaler.java	Fri Feb 25 12:41:07 2011 +0100
+++ b/servlet/src/digilib/servlet/Scaler.java	Tue Mar 01 10:14:29 2011 +0100
@@ -130,7 +130,7 @@
                 + " for " + request.getQueryString());
         long mtime = -1;
         try {
-            // create new request
+            // create new digilib request
             DigilibRequest dlReq = new DigilibRequest(request);
             DocuDirectory dd = dirCache.getDirectory(dlReq.getFilePath());
             if (dd != null) {
@@ -188,7 +188,8 @@
 
         accountlog.debug("request: " + request.getQueryString());
         logger.debug("request: " + request.getQueryString());
-        logger.debug("response:"+ response + " committed=" + response.isCommitted());
+        logger.debug("headers: " + ServletOps.headersToString(request));
+        //logger.debug("response:"+ response + " committed=" + response.isCommitted());
         final long startTime = System.currentTimeMillis();
 
         // parse request
--- a/servlet/src/digilib/servlet/ServletOps.java	Fri Feb 25 12:41:07 2011 +0100
+++ b/servlet/src/digilib/servlet/ServletOps.java	Tue Mar 01 10:14:29 2011 +0100
@@ -303,6 +303,7 @@
     		return;
     	}
         logger.debug("sending to response: ("+ headersToString(response) + ") committed=" + response.isCommitted());
+        // TODO: should we erase or replace old last-modified header?
         try {
             OutputStream outstream = response.getOutputStream();
             // setup output -- if mime type is set use that otherwise