Hi Richard, In addition to Steve's suggestion, you may also try posting your data from a file, instead of the command line. Curl has --data, --data-binary and --data-urlencode options that can be followed with a @filename attribute. Content specified in "filename" will be encoded (or not, in the case of --data-binary) and POSTed to the url specified.
Jason On 9/1/09 1:07 PM, Steve Bayliss wrote: > Hi Richard > > What platform are you running curl on? Could it be that the shell is > picking up the % character and interpreting it as a special character before > passing it to Fedora? You might need to do some command-line escaling. > > Steve > > -----Original Message----- > From: HIGGINS R.I. [mailto:[email protected]] > Sent: 01 September 2009 12:57 > To: [email protected] > Subject: [Fedora-commons-users] Problem uploading redirect URL with > encodedcharacters > > > Hello: > I'm trying to add datastreams to existing records using curl, but have > hit a snag with uploading URLs containing ampersands to dsLocation. This > is what I would have expected with the & character, but using "%26" > instead results in a "6" in the final URL. After trying some other > encoded characters it seems, at some point in the upload, that the "%2" > is stripped off and the result is the third character of the encoded > string. If you substitute "%2B" for the plus signs in the following > command, for example, the result is "B". > > Command is as follows: > curl -i -H "Content-type: text/html" -XPOST > "http://endure.dur.ac.uk:8080/fedora/objects/UkDhU:9f5aa474-67c6-4ad9-af > 85-683bd577ba52/datastreams/BOOKPAGE?dsLabel=View+page+in+book&controlGr > oup=R&dsLocation=http://reed.dur.ac.uk:8080/metsnav/sadsir/navigate.do?p > n=2%26size=full%3Eoid=http://endure.dur.ac.uk:8080/fedora/get/UkDhU:c54f > 280d-bb28-4179-86e9-f2e049e9e003/METS" -u user:password > > Version is Fedora 3.2 > > Is this a Fedora problem? > Thanks > - - - - - > # Richard Higgins > # Durham University Library > # Archives & Special Collections > # Palace Green > # Durham > # DH1 3RN > # E-Mail: [email protected] > > > ---------------------------------------------------------------------------- > -- > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus > on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Fedora-commons-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/fedora-commons-users > > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Fedora-commons-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/fedora-commons-users > -- Jason Nugent Systems Programmer/Database Developer Electronic Text Centre University of New Brunswick [email protected] (506) 447 3177 ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Fedora-commons-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/fedora-commons-users
