When I add or modify a managed XML datastream using the REST API, I am
unable to get the correct mime-type on the datastreamVersion. For
example,

curl -i -XPUT 
"https://example.com:8443/fedora/objects/demo:29/datastreams/dctst?mimeType=text/xml&controlGroup=M&dsLabel=Test+mimeType";
--data-binary @dc.xml -k -u fedoraAdmin:******

creates a datastreamVersion like this:

<foxml:datastreamVersion ID="dctst.5" LABEL="Test mimeType"
CREATED="2010-03-03T18:10:23.286Z"
MIMETYPE="application/x-www-form-urlencoded">
<foxml:contentLocation TYPE="INTERNAL_ID" REF="demo:29+dctst+dctst.5"/>
</foxml:datastreamVersion>

(I've tried it url-encoded with the mimeType=text%2Fxml also)

I know that I can add -H "Content-Type: text/xml" to the cURL command
and get the right mime-type in the datastreamVersion, but the problem
is that I am trying to write client application using PHP and libcurl
and adding a content-type request header doesn't work with that mix.
And the mimeType parameter is supposed to override the request header
anyway, or am I not using it correctly?

I am trying to update a Fedora 3.1 repository.

thanks,
-Don

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Fedora-commons-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fedora-commons-users

Reply via email to