abdera-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmsn...@apache.org
Subject svn commit: r550933 - /incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/provider/AbstractProvider.java
Date Tue, 26 Jun 2007 20:31:18 GMT
Author: jmsnell
Date: Tue Jun 26 13:31:17 2007
New Revision: 550933

URL: http://svn.apache.org/viewvc?view=rev&rev=550933
Log:
Set the entity tag if it's contained in the Document

Modified:
    incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/provider/AbstractProvider.java

Modified: incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/provider/AbstractProvider.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/provider/AbstractProvider.java?view=diff&rev=550933&r1=550932&r2=550933
==============================================================================
--- incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/provider/AbstractProvider.java
(original)
+++ incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/provider/AbstractProvider.java
Tue Jun 26 13:31:17 2007
@@ -225,6 +225,14 @@
       response.setStatus(status);
       if (lastModified != null) response.setLastModified(lastModified);
       response.setContentType(MimeTypeHelper.getMimeType(base));
+      
+      Document doc = base instanceof Document ? (Document)base : ((Element)base).getDocument();
+      if (doc.getEntityTag() != null) {
+        response.setEntityTag(doc.getEntityTag());
+      } else if (doc.getLastModified() != null) {
+        response.setLastModified(doc.getLastModified());
+      }
+      
       return response;
   }
 



Mime
View raw message