Does Filenamewithspaces.txt have URLs with spaces in it?

Since it's an IRISyntaxException (an IRI is basically a URL) my guess is
that you have a space in a URL somewhere in your file.

Phil

On Thu, Oct 23, 2014 at 8:08 AM, TAYLOR Robin <robin.tay...@ed.ac.uk> wrote:

>  Hi Rahul,
>
>
>  Its not an area I know about I'm afraid so I'm forwarding on your email
> to the Sword Tech list.
>
>
>  Cheers, Robin.
>
>
>   Robin Taylor
> Main Library
> University of Edinburgh
>   ------------------------------
> *From:* Rahul Khanna <rahul.kha...@anu.edu.au>
> *Sent:* 23 October 2014 03:02
> *To:* TAYLOR Robin
> *Subject:* Question re Sword v2 server implementation in DSpace v4.2
>
>
> Hi Robin,
>
> I'm a developer working on The Australian National University's instance
> of DSpace. I'm currently working on the Sword v2 server on DSpace v4.2
> running on Windows 7 and noticed an issue that I'm not quite sure who to
> contact for its resolution:
>
>
>
> Running this CURL command results in the following exception on the server
> side:
>
>
>
> curl -X POST \
>
> -d 'test string' \
>
> --header "packaging: http://purl.org/net/sword/package/Binary"; \
>
> --header "user-agent: SWORD Client 2.0" \
>
> --header "content-disposition: attachment; filename=\"Filename with
> spaces.txt\"" \
>
> --header "metadata-relevant: false" \
>
> --user myusername:secret \
>
> -v \
>
> "http://localhost:8080/swordv2/edit-media/12887";
>
>
>
> ***************
>
>
>
> org.apache.abdera.i18n.iri.IRISyntaxException:
> org.apache.abdera.i18n.text.InvalidCharacterException: Invalid Character
> 0x20( )
>
>         org.apache.abdera.i18n.iri.IRI.parse(IRI.java:572)
>
>         org.apache.abdera.i18n.iri.IRI.&lt;init&gt;(IRI.java:64)
>
>
> org.dspace.sword2.ReceiptGenerator.createFileReceipt(ReceiptGenerator.java:47)
>
>
> org.dspace.sword2.MediaResourceManagerDSpace.addResource(MediaResourceManagerDSpace.java:742)
>
>
> org.swordapp.server.MediaResourceAPI.post(MediaResourceAPI.java:272)
>
>
> org.swordapp.server.servlets.MediaResourceServletDefault.doPost(MediaResourceServletDefault.java:49)
>
>         javax.servlet.http.HttpServlet.service(HttpServlet.java:646)
>
>         javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
>
>
> org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
>
> </pre></p><p><b>root cause</b>
> <pre>org.apache.abdera.i18n.text.InvalidCharacterException: Invalid
> Character 0x20( )
>
>
> org.apache.abdera.i18n.text.CodepointIterator$RestrictedCodepointIterator.next(CodepointIterator.java:476)
>
>         org.apache.abdera.i18n.text.CharUtils.verify(CharUtils.java:820)
>
>         org.apache.abdera.i18n.text.CharUtils.verify(CharUtils.java:838)
>
>         org.apache.abdera.i18n.iri.IRI.parse(IRI.java:568)
>
>         org.apache.abdera.i18n.iri.IRI.&lt;init&gt;(IRI.java:64)
>
>
> org.dspace.sword2.ReceiptGenerator.createFileReceipt(ReceiptGenerator.java:47)
>
>
> org.dspace.sword2.MediaResourceManagerDSpace.addResource(MediaResourceManagerDSpace.java:742)
>
>
> org.swordapp.server.MediaResourceAPI.post(MediaResourceAPI.java:272)
>
>
> org.swordapp.server.servlets.MediaResourceServletDefault.doPost(MediaResourceServletDefault.java:49)
>
>         javax.servlet.http.HttpServlet.service(HttpServlet.java:646)
>
>         javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
>
>
> org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
>
>
>
> *******************
>
>
>
> In the curl command if I remove all the spaces from the filename and
> change it to the server performs the action as expected:
>
>
>
> --header "content-disposition: attachment; filename=Filenamewithspaces.txt"
>
>
>
> Would you be able to confirm if DSpace v4.2 isn't expected to accept
> deposits with filenames with spaces through Sword? There's nothing about
> filenames with spaces in the Sword v2 specification at
> http://swordapp.github.io/SWORDv2-Profile/SWORDProfile.html . Is this by
> any chance a known issue? I've already searched through the DSpace-Tech
> mailing list and didn't find anything relevant. Should I go ahead and file
> a bug with the Apache Abdera developers? Or should I file a bug for DSpace?
>
>
>
> Thank you,
>
> Rahul.
>
>
>
>
>
> Rahul Khanna
>
> Systems Developer
>
> IT Services |Menzies Building, Level 4 |The Australian National University
> | ACTON ACT 2601
>
> T: +61 2 6125 9010 | E: rahul.kha...@anu.edu.au
>
>
>
>
>
> The University of Edinburgh is a charitable body, registered in
> Scotland, with registration number SC005336.
>
>
> ------------------------------------------------------------------------------
>
> _______________________________________________
> sword-app-tech mailing list
> sword-app-tech@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/sword-app-tech
>
>


-- 
Philip Durbin
Software Developer for http://dataverse.org
http://www.iq.harvard.edu/people/philip-durbin
------------------------------------------------------------------------------
_______________________________________________
sword-app-tech mailing list
sword-app-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sword-app-tech

Reply via email to