Hi Richard! I just sent you separate pull request for the same issue:
generalise getName/getFilename into getContentDispositionValue by pdurbin · Pull Request #3 · swordapp/JavaServer2.0 - https://github.com/swordapp/JavaServer2.0/pull/3 Here's the text I put in the pull request: --- This pull request aims to resolve "this is the same code as above, but with a different token; generalise" FIXME as well as the "first character truncated from filename in Content-Disposition" issue reported in http://www.mail-archive.com/sword-app-tech@lists.sourceforge.net/msg00337.html It uses http://commons.apache.org/proper/commons-fileupload/apidocs/org/apache/commons/fileupload/ParameterParser.html Please note that a semicolon is used as a separator but http://svn.apache.org/viewvc/commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/ParameterParserTest.java?r1=1455469&r2=1455470&pathrev=1515823& suggests that a comma might be a legitimate separator per https://issues.apache.org/jira/browse/FILEUPLOAD-139 --- Thanks, Phil On Thu, Aug 1, 2013 at 12:51 PM, Richard Jones <rich...@cottagelabs.com> wrote: > Hi Phil, > > On 28 June 2013 22:05, Philip Durbin <philip_dur...@harvard.edu> wrote: >> On Thu, Jun 27, 2013 at 10:53 AM, Philip Durbin >> <philip_dur...@harvard.edu> wrote: >>> Before the jar gets published, I believe I may have found a bug here: >>> >>> https://github.com/swordapp/JavaServer2.0/blob/31e625ac97be13f794e1b98512f8d1c48d751652/src/main/java/org/swordapp/server/SwordAPIEndpoint.java#L435 >>> >>> When I use the following command... >>> >>> curl --insecure -s -H "X-On-Behalf-Of: obo" --http1.0 --data-binary >>> "@example.zip" -H "Content-Disposition: filename=example.zip" -H >>> "Content-Type: application/zip" >>> https://sword:sword@localhost:8181/swordpoc/collection/a4f21cdc-f20c-4c82-b63e-5df81f809417 >>> >>> ... my "example.zip" file gets uploaded as "xample.zip" (i.e. the >>> first character is removed). I can easily reproduce this in Vagrant >>> with https://github.com/dvn/swordpoc if you'd like more detail. >> >> FYI, this bug has been confirmed by Bill McKinney who has submitted a >> pull request called "enhanced content disposition handling": >> https://github.com/swordapp/JavaServer2.0/pull/2 > > Great, thanks; I've not incorporated it yet purely due to lack of time > to look at sword for a month or so. I did bump into Bill at OR13 in > Canada, which was great, and he did prod me about it on your behalf :) > I will get this onto my todo list, though, thanks for submitting it! > > Cheers, > > Richard > >> For my part, I'm moved my proof of concept code into an experimental >> branch in our app itself: https://github.com/IQSS/dvn/commit/4838565 >> >> I can keep https://github.com/dvn/swordpoc around for anyone who wants >> to see the library exercised a bit with some working code. >> >> Phil >> >> -- >> Philip Durbin >> Software Developer for http://thedata.org >> http://www.iq.harvard.edu/people/philip-durbin > > > > -- > > Richard Jones, > > Founder, Cottage Labs > t: @richard_d_jones, @cottagelabs > w: http://cottagelabs.com -- Philip Durbin Software Developer for http://thedata.org http://www.iq.harvard.edu/people/philip-durbin ------------------------------------------------------------------------------ Introducing Performance Central, a new site from SourceForge and AppDynamics. Performance Central is your source for news, insights, analysis and resources for efficient Application Performance Management. Visit us today! http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk _______________________________________________ sword-app-tech mailing list sword-app-tech@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sword-app-tech