abdera-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmsn...@apache.org
Subject svn commit: r443128 - /incubator/abdera/java/trunk/protocol/src/main/java/org/apache/abdera/protocol/EntityTag.java
Date Wed, 13 Sep 2006 21:23:37 GMT
Author: jmsnell
Date: Wed Sep 13 14:23:36 2006
New Revision: 443128

URL: http://svn.apache.org/viewvc?view=rev&rev=443128
Log:
per RFC2616, Entity Tags must not contain quotes. 

Modified:
    incubator/abdera/java/trunk/protocol/src/main/java/org/apache/abdera/protocol/EntityTag.java

Modified: incubator/abdera/java/trunk/protocol/src/main/java/org/apache/abdera/protocol/EntityTag.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/protocol/src/main/java/org/apache/abdera/protocol/EntityTag.java?view=diff&rev=443128&r1=443127&r2=443128
==============================================================================
--- incubator/abdera/java/trunk/protocol/src/main/java/org/apache/abdera/protocol/EntityTag.java
(original)
+++ incubator/abdera/java/trunk/protocol/src/main/java/org/apache/abdera/protocol/EntityTag.java
Wed Sep 13 14:23:36 2006
@@ -108,8 +108,14 @@
   }
   
   public EntityTag(String tag, boolean weak) {
+    checkTag(tag);
     this.tag = tag;
     this.weak = weak;
+  }
+  
+  private void checkTag(String tag) {
+    if (tag.contains("\"")) 
+      throw new IllegalArgumentException("Invalid Entity Tag");
   }
   
   public String getTag() {



Mime
View raw message