From: Stefan M. <ste...@un...> - 2010-10-05 13:50:15
|
Hi peter, dannes, (moved this to exist-dev) On 05/10/10 12:48, Hungerburg wrote: > When I PUT a file onto the server through the webdav servlet, then the > mime-type is different than eg. with the rest servlet or the rpc-client. > I noticed something similar for application/xquery. I have to admit that the WebDAV now behaves so smoothly now that I am really using it! Thanks for that. But, whenever I put some xq or xql it ends up being application/octet-stream in the database. What I found interesting was that it appeared to be logged as the correct mime-type. I tracked it that far that in org.exist.webdav.ExistCollection the contentType that is passed never gets replaced with the value of mime.getName() if that is available. But mime.getName() is used for logging. I tried below 1 loc patch, which works for me, but I would be happy if someone could confirm if this is right or not: Index: ExistCollection.java =================================================================== --- ExistCollection.java (revision 12870) +++ ExistCollection.java (working copy) @@ -360,6 +360,9 @@ if (mime == null) { mime = MimeType.BINARY_TYPE; } + else { + contentType = mime.getName(); + } if (mime.isXMLType()) { Kind regards, Stefan -- | Stefan Majewski | Department of English, University of Vienna | | VOICE Corpus | Spitalgasse 2-4, Universitätscampus AAKH, Hof 8 | | | A-1090 Vienna | | Research Ass.(IT)| Phone: +43 1 4277 424 46 | |