abdera-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dan Diephouse <dan.diepho...@mulesource.com>
Subject FOMEntry & IRI encoding [was Re: svn commit: r584318 - ..]
Date Sat, 13 Oct 2007 19:14:47 GMT
jmsnell@apache.org wrote:
> Author: jmsnell
> Date: Fri Oct 12 16:21:49 2007
> New Revision: 584318
>
> URL: http://svn.apache.org/viewvc?rev=584318&view=rev
> Log:
> Commit https://issues.apache.org/jira/browse/ABDERA-73. There was one change to FOMEntry
included in the patch that I omitted from this as it did not appear to be directly relevant.
>
>   
Hi James, thanks for applying my patch!

Was there anything wrong with this change:

Index: parser/src/main/java/org/apache/abdera/parser/stax/FOMEntry.java
===================================================================
--- parser/src/main/java/org/apache/abdera/parser/stax/FOMEntry.java    
(revision 584433)
+++ parser/src/main/java/org/apache/abdera/parser/stax/FOMEntry.java    
(working copy)
@@ -313,7 +313,7 @@
     try {
       FOMFactory factory = (FOMFactory) this.factory;
       Content content = factory.newContent(new MimeType(mediatype));
-      content.setSrc(uri.toString());
+      content.setSrc(uri.toASCIIString());
       setContentElement(content);
       return content;
     } catch (javax.activation.MimeTypeParseException e) {

My application doesn't work correctly without it because my IRI has 
spaces in it sometimes. Since we're converting it to a String for the 
<content> element we need to encode these characters.

- Dan

-- 
Dan Diephouse
MuleSource
http://mulesource.com | http://netzooid.com/blog


Mime
View raw message