You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "Claus Köll (JIRA)" <ji...@apache.org> on 2008/02/18 09:18:35 UTC

[jira] Created: (JCR-1393) Unknown Mimetype should not be set automatically to application/octet-stream

Unknown Mimetype should not be set automatically to application/octet-stream
----------------------------------------------------------------------------

                 Key: JCR-1393
                 URL: https://issues.apache.org/jira/browse/JCR-1393
             Project: Jackrabbit
          Issue Type: Bug
          Components: jackrabbit-webdav
    Affects Versions: 1.4
            Reporter: Claus Köll


if i add a node to jackrabbit i add the jcr:content node as nt:resource. 
if i open now this document with webdav i found that the DefaultHandler 
looks if the jcr:content node is from type nt:unstructured, if not 
the child properties of the content node will be deleted and the properties will be set again. 
so there is a problem with the mimetype. if i do that with a office 07 document (.docx) 
the original mimetype "application/msword" will be changed to "application/octet-stream". 


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (JCR-1393) Unknown Mimetype should not be set automatically to application/octet-stream

Posted by "Claus Köll (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JCR-1393?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Köll updated JCR-1393:
----------------------------

    Attachment: patch.txt

hi angela,
no i do not have defined a extension. i didnt know that file :-)
i have created a patch that sets the last mimetype
what do you think about that ?


> Unknown Mimetype should not be set automatically to application/octet-stream
> ----------------------------------------------------------------------------
>
>                 Key: JCR-1393
>                 URL: https://issues.apache.org/jira/browse/JCR-1393
>             Project: Jackrabbit
>          Issue Type: Bug
>          Components: jackrabbit-webdav
>    Affects Versions: 1.4
>            Reporter: Claus Köll
>         Attachments: patch.txt
>
>
> if i add a node to jackrabbit i add the jcr:content node as nt:resource. 
> if i open now this document with webdav i found that the DefaultHandler 
> looks if the jcr:content node is from type nt:unstructured, if not 
> the child properties of the content node will be deleted and the properties will be set again. 
> so there is a problem with the mimetype. if i do that with a office 07 document (.docx) 
> the original mimetype "application/msword" will be changed to "application/octet-stream". 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (JCR-1393) Unknown Mimetype should not be set automatically to application/octet-stream

Posted by "angela (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JCR-1393?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12570147#action_12570147 ] 

angela commented on JCR-1393:
-----------------------------

> no i do not have defined a extension. i didnt know that file :-) 

that has been covered by JCR-1188.

> i have created a patch that sets the last mimetype 

hm. that's a different issue than the one mentioned in the subject, isn't it? i prefer not to mix
various problems into one single jira issue.

regarding the patch: i think its a workaround for the removal of jcr:content in case of non-matching nodetype. i would rather want to address this one instead of working around (see below).

> why will the nodetype be changed if it is nt:resource ? 

because tobi decided to remove the content-node if it is not of the required nodetype:
see: JCR-973 XML import using MacOS X WebDAV client does not work.
maybe you should ask him for the rationals.

i don't feel attached to that. but there was for sure a reason to add it.
the obvious drawback of not-removing is: if the node has not been created through webdav
you may run into failing PUT and PROPPATCH. But i would argue, that this is a logic consequence of the webdav-server being forced to deal with content, that has not been added through webdav.

regarding the original issue (see subject):
can you confirm if this is a duplicate of JCR-1188? (and if so, close this one).

thanks
angela






> Unknown Mimetype should not be set automatically to application/octet-stream
> ----------------------------------------------------------------------------
>
>                 Key: JCR-1393
>                 URL: https://issues.apache.org/jira/browse/JCR-1393
>             Project: Jackrabbit
>          Issue Type: Bug
>          Components: jackrabbit-webdav
>    Affects Versions: 1.4
>            Reporter: Claus Köll
>         Attachments: patch.txt
>
>
> if i add a node to jackrabbit i add the jcr:content node as nt:resource. 
> if i open now this document with webdav i found that the DefaultHandler 
> looks if the jcr:content node is from type nt:unstructured, if not 
> the child properties of the content node will be deleted and the properties will be set again. 
> so there is a problem with the mimetype. if i do that with a office 07 document (.docx) 
> the original mimetype "application/msword" will be changed to "application/octet-stream". 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (JCR-1393) Unknown Mimetype should not be set automatically to application/octet-stream

Posted by "Claus Köll (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JCR-1393?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12570131#action_12570131 ] 

Claus Köll commented on JCR-1393:
---------------------------------

ah.. one more question,
why will the nodetype be changed if it is nt:resource ?


> Unknown Mimetype should not be set automatically to application/octet-stream
> ----------------------------------------------------------------------------
>
>                 Key: JCR-1393
>                 URL: https://issues.apache.org/jira/browse/JCR-1393
>             Project: Jackrabbit
>          Issue Type: Bug
>          Components: jackrabbit-webdav
>    Affects Versions: 1.4
>            Reporter: Claus Köll
>         Attachments: patch.txt
>
>
> if i add a node to jackrabbit i add the jcr:content node as nt:resource. 
> if i open now this document with webdav i found that the DefaultHandler 
> looks if the jcr:content node is from type nt:unstructured, if not 
> the child properties of the content node will be deleted and the properties will be set again. 
> so there is a problem with the mimetype. if i do that with a office 07 document (.docx) 
> the original mimetype "application/msword" will be changed to "application/octet-stream". 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (JCR-1393) Unknown Mimetype should not be set automatically to application/octet-stream

Posted by "angela (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JCR-1393?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12570178#action_12570178 ] 

angela commented on JCR-1393:
-----------------------------

so. can you please open a new issue for the 'removing-nodes with unexpected nodetype'
problem and refer to JCR-973?
this will give tobi the chance to explain why it should be the other way round.

thanks
angela

> Unknown Mimetype should not be set automatically to application/octet-stream
> ----------------------------------------------------------------------------
>
>                 Key: JCR-1393
>                 URL: https://issues.apache.org/jira/browse/JCR-1393
>             Project: Jackrabbit
>          Issue Type: Bug
>          Components: jackrabbit-webdav
>    Affects Versions: 1.4
>            Reporter: Claus Köll
>         Attachments: patch.txt
>
>
> if i add a node to jackrabbit i add the jcr:content node as nt:resource. 
> if i open now this document with webdav i found that the DefaultHandler 
> looks if the jcr:content node is from type nt:unstructured, if not 
> the child properties of the content node will be deleted and the properties will be set again. 
> so there is a problem with the mimetype. if i do that with a office 07 document (.docx) 
> the original mimetype "application/msword" will be changed to "application/octet-stream". 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (JCR-1393) Unknown Mimetype should not be set automatically to application/octet-stream

Posted by "Claus Köll (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JCR-1393?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Köll closed JCR-1393.
---------------------------

    Resolution: Duplicate

hi angela,
thanks for the informations. ok i think with JCR-1188 i'm able to fix my problems with unknown mimetypes.
i think also its a logical consequence  that there can be problems with webdav if the node was not added with webdav itself.
so i do not think its a good idea to change the nodetype because it can be a complex failure search in the future 
if we automatically replace a nodetype from a node that was set programatically !

> Unknown Mimetype should not be set automatically to application/octet-stream
> ----------------------------------------------------------------------------
>
>                 Key: JCR-1393
>                 URL: https://issues.apache.org/jira/browse/JCR-1393
>             Project: Jackrabbit
>          Issue Type: Bug
>          Components: jackrabbit-webdav
>    Affects Versions: 1.4
>            Reporter: Claus Köll
>         Attachments: patch.txt
>
>
> if i add a node to jackrabbit i add the jcr:content node as nt:resource. 
> if i open now this document with webdav i found that the DefaultHandler 
> looks if the jcr:content node is from type nt:unstructured, if not 
> the child properties of the content node will be deleted and the properties will be set again. 
> so there is a problem with the mimetype. if i do that with a office 07 document (.docx) 
> the original mimetype "application/msword" will be changed to "application/octet-stream". 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (JCR-1393) Unknown Mimetype should not be set automatically to application/octet-stream

Posted by "angela (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JCR-1393?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12570126#action_12570126 ] 

angela commented on JCR-1393:
-----------------------------

do you have an extension in you resource-configuration that defines the .docx extension?

"application/octet-stream" is the default for unknown extensions if 
- no mapping fits (and the mimetype.properties probably don't list docx)
- the request does not send a content-type header.

angela



> Unknown Mimetype should not be set automatically to application/octet-stream
> ----------------------------------------------------------------------------
>
>                 Key: JCR-1393
>                 URL: https://issues.apache.org/jira/browse/JCR-1393
>             Project: Jackrabbit
>          Issue Type: Bug
>          Components: jackrabbit-webdav
>    Affects Versions: 1.4
>            Reporter: Claus Köll
>
> if i add a node to jackrabbit i add the jcr:content node as nt:resource. 
> if i open now this document with webdav i found that the DefaultHandler 
> looks if the jcr:content node is from type nt:unstructured, if not 
> the child properties of the content node will be deleted and the properties will be set again. 
> so there is a problem with the mimetype. if i do that with a office 07 document (.docx) 
> the original mimetype "application/msword" will be changed to "application/octet-stream". 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.