abdera-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmsn...@apache.org
Subject svn commit: r1175210 - in /abdera/abdera2/common/src/main/java/org/apache/abdera2/common/protocol: AbstractRequest.java AbstractResponseContext.java
Date Sat, 24 Sep 2011 18:05:45 GMT
Author: jmsnell
Date: Sat Sep 24 18:05:44 2011
New Revision: 1175210

URL: http://svn.apache.org/viewvc?rev=1175210&view=rev
Log:
Minor tweaks

Modified:
    abdera/abdera2/common/src/main/java/org/apache/abdera2/common/protocol/AbstractRequest.java
    abdera/abdera2/common/src/main/java/org/apache/abdera2/common/protocol/AbstractResponseContext.java

Modified: abdera/abdera2/common/src/main/java/org/apache/abdera2/common/protocol/AbstractRequest.java
URL: http://svn.apache.org/viewvc/abdera/abdera2/common/src/main/java/org/apache/abdera2/common/protocol/AbstractRequest.java?rev=1175210&r1=1175209&r2=1175210&view=diff
==============================================================================
--- abdera/abdera2/common/src/main/java/org/apache/abdera2/common/protocol/AbstractRequest.java
(original)
+++ abdera/abdera2/common/src/main/java/org/apache/abdera2/common/protocol/AbstractRequest.java
Sat Sep 24 18:05:44 2011
@@ -24,9 +24,6 @@ import org.apache.abdera2.common.http.En
 
 public abstract class AbstractRequest extends AbstractMessage implements Request {
 
-    protected long max_stale = -1;
-    protected long min_fresh = -1;
-
     public String getAccept() {
         return getHeader("Accept");
     }

Modified: abdera/abdera2/common/src/main/java/org/apache/abdera2/common/protocol/AbstractResponseContext.java
URL: http://svn.apache.org/viewvc/abdera/abdera2/common/src/main/java/org/apache/abdera2/common/protocol/AbstractResponseContext.java?rev=1175210&r1=1175209&r2=1175210&view=diff
==============================================================================
--- abdera/abdera2/common/src/main/java/org/apache/abdera2/common/protocol/AbstractResponseContext.java
(original)
+++ abdera/abdera2/common/src/main/java/org/apache/abdera2/common/protocol/AbstractResponseContext.java
Sat Sep 24 18:05:44 2011
@@ -165,7 +165,7 @@ public abstract class AbstractResponseCo
     }
 
     public <T extends ResponseContext>T setAge(long age) {
-        return (T)(age == -1 ? removeHeader("Age") : setHeader("Age", String.valueOf(age)));
+        return (T)(age <= -1 ? removeHeader("Age") : setHeader("Age", String.valueOf(age)));
     }
 
     public <T extends ResponseContext>T setContentLanguage(String language) {
@@ -173,7 +173,7 @@ public abstract class AbstractResponseCo
     }
 
     public <T extends ResponseContext>T setContentLength(long length) {
-        return (T)(length == -1 ? removeHeader("Content-Length") : setHeader("Content-Length",
String.valueOf(length)));
+        return (T)(length <= -1 ? removeHeader("Content-Length") : setHeader("Content-Length",
String.valueOf(length)));
     }
 
     public <T extends ResponseContext>T setContentLocation(String uri) {



Mime
View raw message