abdera-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmsn...@apache.org
Subject svn commit: r517976 - /incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMCollection.java
Date Wed, 14 Mar 2007 02:47:43 GMT
Author: jmsnell
Date: Tue Mar 13 19:47:42 2007
New Revision: 517976

URL: http://svn.apache.org/viewvc?view=rev&rev=517976
Log:
Close a long standing todo to allow the accept element to contain media ranges whose 
quoted parameter values contain commas. e.g.,

<accept>text/plain, image/foo;test="a,b,c", application/bar</accept>

This still might not cover all of the hypothetical corner cases but it works.

Modified:
    incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMCollection.java

Modified: incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMCollection.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMCollection.java?view=diff&rev=517976&r1=517975&r2=517976
==============================================================================
--- incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMCollection.java
(original)
+++ incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMCollection.java
Tue Mar 13 19:47:42 2007
@@ -152,7 +152,7 @@
     if (accept == null) return ENTRY;
     else accept = accept.trim();
     if (accept.length() == 0) return EMPTY;
-    String[] list = accept.split("\\s*,\\s*");
+    String[] list = accept.split("\\s*,\\s*(?=(?:[^\"]*\"[^\"]*\")*(?![^\"]*\"))");
     return MimeTypeHelper.condense(list);
   }
 



Mime
View raw message