-------- Original Message -------- Subject: Re: Fwd: [Taverna-hackers] cannot set input baclava file name Date: Mon, 26 Mar 2012 21:11:25 +0100 From: Donal K. Fellows <[email protected]> Organisation: University of Manchester To: Jorge de Jesus <[email protected]> CC: Alan R Williams <[email protected]>
On 26/03/2012 16:31, Jorge de Jesus wrote: > I'm sending the baclava with PUT into an URL like this (as indicate by > the documentation) > http://localhost:8080/taverna-server/rest/runs/9259dee9-651c-4e28-9f6c-c8bf877c398b/input/baclava > > The reply I get is a HTTP 403 and the payload contains the error : > "cannot set input baclava file name" > > In the tomcat files I see that the file arrived to the server and the > input seems ok > Address: > /taverna-server/rest/runs/9259dee9-651c-4e28-9f6c-c8bf877c398b/input/baclava > > Encoding: ISO-8859-1 > Content-Type: text/plain That's the problem right there. When PUTting a file, you have to use application/octet-stream as its content type. (Arguably it should accept any type — the processing is identical in all cases, as it will just dump the bytes to the filesystem — but right now it doesn't.) This _is_ documented, but if you're not expecting it it's perhaps easy to miss. This is part of why we recommend using Rob Haines's library that wraps these details up. :-) Dona.. ------------------------------------------------------------------------------ This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure _______________________________________________ taverna-hackers mailing list [email protected] Web site: http://www.taverna.org.uk Mailing lists: http://www.taverna.org.uk/about/contact-us/ Developers Guide: http://www.taverna.org.uk/developers/
