From: Hungerburg <pc...@my...> - 2010-10-06 16:52:38
|
Hello Stefan, Dannes, Another case for changing the mime-type setting: below log snippet of the most striking failure of the MimeUtil parser: > DEBUG (PutHandler.java [processCreate]:153) - process: putting to: views > DEBUG (MimeUtil.java [getMimeTypes]:478) - Getting mime types for file name [fop.xq]. > DEBUG (MimeUtil.java [getMimeTypes]:974) - Retrieved mime types [application/octet-stream] > DEBUG (PutHandler.java [processCreate]:157) - PutHandler: creating resource of type: application/octet-stream > DEBUG (MiltonCollection.java [createNew]:245) - Create 'fop.xq' in '/db/apps/produkte/views' > DEBUG (ExistCollection.java [createFile]:333) - Create 'fop.xq' in '/db/apps/produkte/views' > DEBUG (ExistCollection.java [createFile]:334) - Create 'fop.xq' passed-in-type 'application/octet-stream' > DEBUG (ExistCollection.java [createFile]:392) - Inserting BINARY document 'application/xquery' > DEBUG (Collection.java [checkPermissions]:1376) - Found old doc 1548 > DEBUG (Collection.java [addBinaryResource]:1502) - removing old document fop.xq > DEBUG (NativeBroker.java [removeBinaryResource]:2287) - removing binary resource 1548... > DEBUG (RenameBinaryLoggable.java [<init>]:39) - Rename binary created /opt/eXist/webapp/WEB-INF/data/fs/[...] > DEBUG (NativeBroker.java [removeResourceMetadata]:2335) - Removing resource metadata for 1548 > DEBUG (CreateBinaryLoggable.java [<init>]:36) - CreateBinaryLoggable created > DEBUG (ExistCollection.java [createFile]:401) - Document created sucessfully > DEBUG (ExistCollection.java [createFile]:447) - Finished creation As Stefan said before: it does not recognise xquery-scripts ;) On the patch: I just left out the "else", because after the test, mime is guaranteed to not be "null". I have yet to upload a document, that does not create "mime". Maybe then, contentType was also "null", so to set it only on the condition, that mime was not "null" would be a bug then. A production solution will have to wait for Dannes. Maybe upstream mimeutil can be fixed. There is no hurry, at least for me, as your workaround seems fine. As is, its not ready for release, I'd say. -- peter |