You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "Yaytay (JIRA)" <ji...@apache.org> on 2011/06/12 15:50:51 UTC

[jira] [Created] (CAMEL-4094) Build failure for camel-jetty, which displays bigger problems with content-type handling for multipart forms

Build failure for camel-jetty, which displays bigger problems with content-type handling for multipart forms
------------------------------------------------------------------------------------------------------------

                 Key: CAMEL-4094
                 URL: https://issues.apache.org/jira/browse/CAMEL-4094
             Project: Camel
          Issue Type: Test
          Components: camel-http, camel-jetty
    Affects Versions: 2.7.2
         Environment: OpenJDK displays the problem, but actually there is an issue with all platforms.
            Reporter: Yaytay
            Priority: Minor


Camel-jetty has a build failure in MultiPartFormTest when built with OpenJDK.

The assertion 
assertEquals("Get a wrong content type", "text/plain", data.getContentType());
within the route causes a 500 error to be seen by the client (there is no logging to the display of the assertion failure).

Further investigation has shown that:
1. The content-type sent with the HTTP request (for the file part) is always "application/octet-stream", the default for FilePart - this does not appear to be what is desired (the CamelFilePart class would fix it, but this doesn't seem to be used).
2. The content-type for file parts is not made available by jetty, so data.getContentType() always returns the default content-type for the DataHandler class.
3. Different DataHandler implementations have different default content-types (Sun has "text/plain", OpenJDK has "application/octet-stream").

It is the last difference that causes the build break, but that should be irrelevant if the other two things were fixed.
I have raised [https://bugs.eclipse.org/bugs/show_bug.cgi?id=349110] against jetty to try to get the content type made available, but until that happens I've got a patch to simply remove the incorrect assertion.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (CAMEL-4094) Build failure for camel-jetty, which displays bigger problems with content-type handling for multipart forms

Posted by "Willem Jiang (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-4094?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Willem Jiang resolved CAMEL-4094.
---------------------------------

       Resolution: Fixed
    Fix Version/s: 2.8.0

Applied patch with thanks to Yaytay.

> Build failure for camel-jetty, which displays bigger problems with content-type handling for multipart forms
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-4094
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4094
>             Project: Camel
>          Issue Type: Test
>          Components: camel-http, camel-jetty
>    Affects Versions: 2.7.2
>         Environment: OpenJDK displays the problem, but actually there is an issue with all platforms.
>            Reporter: Yaytay
>            Assignee: Willem Jiang
>            Priority: Minor
>             Fix For: 2.8.0
>
>         Attachments: Patch.diff
>
>
> Camel-jetty has a build failure in MultiPartFormTest when built with OpenJDK.
> The assertion 
> assertEquals("Get a wrong content type", "text/plain", data.getContentType());
> within the route causes a 500 error to be seen by the client (there is no logging to the display of the assertion failure).
> Further investigation has shown that:
> 1. The content-type sent with the HTTP request (for the file part) is always "application/octet-stream", the default for FilePart - this does not appear to be what is desired (the CamelFilePart class would fix it, but this doesn't seem to be used).
> 2. The content-type for file parts is not made available by jetty, so data.getContentType() always returns the default content-type for the DataHandler class.
> 3. Different DataHandler implementations have different default content-types (Sun has "text/plain", OpenJDK has "application/octet-stream").
> It is the last difference that causes the build break, but that should be irrelevant if the other two things were fixed.
> I have raised [https://bugs.eclipse.org/bugs/show_bug.cgi?id=349110] against jetty to try to get the content type made available, but until that happens I've got a patch to simply remove the incorrect assertion.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Assigned] (CAMEL-4094) Build failure for camel-jetty, which displays bigger problems with content-type handling for multipart forms

Posted by "Willem Jiang (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-4094?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Willem Jiang reassigned CAMEL-4094:
-----------------------------------

    Assignee: Willem Jiang

> Build failure for camel-jetty, which displays bigger problems with content-type handling for multipart forms
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-4094
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4094
>             Project: Camel
>          Issue Type: Test
>          Components: camel-http, camel-jetty
>    Affects Versions: 2.7.2
>         Environment: OpenJDK displays the problem, but actually there is an issue with all platforms.
>            Reporter: Yaytay
>            Assignee: Willem Jiang
>            Priority: Minor
>         Attachments: Patch.diff
>
>
> Camel-jetty has a build failure in MultiPartFormTest when built with OpenJDK.
> The assertion 
> assertEquals("Get a wrong content type", "text/plain", data.getContentType());
> within the route causes a 500 error to be seen by the client (there is no logging to the display of the assertion failure).
> Further investigation has shown that:
> 1. The content-type sent with the HTTP request (for the file part) is always "application/octet-stream", the default for FilePart - this does not appear to be what is desired (the CamelFilePart class would fix it, but this doesn't seem to be used).
> 2. The content-type for file parts is not made available by jetty, so data.getContentType() always returns the default content-type for the DataHandler class.
> 3. Different DataHandler implementations have different default content-types (Sun has "text/plain", OpenJDK has "application/octet-stream").
> It is the last difference that causes the build break, but that should be irrelevant if the other two things were fixed.
> I have raised [https://bugs.eclipse.org/bugs/show_bug.cgi?id=349110] against jetty to try to get the content type made available, but until that happens I've got a patch to simply remove the incorrect assertion.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CAMEL-4094) Build failure for camel-jetty, which displays bigger problems with content-type handling for multipart forms

Posted by "Yaytay (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-4094?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13048319#comment-13048319 ] 

Yaytay commented on CAMEL-4094:
-------------------------------

Discussion:
http://camel.465427.n5.nabble.com/Build-break-in-camel-jetty-td4468084.html

> Build failure for camel-jetty, which displays bigger problems with content-type handling for multipart forms
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-4094
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4094
>             Project: Camel
>          Issue Type: Test
>          Components: camel-http, camel-jetty
>    Affects Versions: 2.7.2
>         Environment: OpenJDK displays the problem, but actually there is an issue with all platforms.
>            Reporter: Yaytay
>            Priority: Minor
>
> Camel-jetty has a build failure in MultiPartFormTest when built with OpenJDK.
> The assertion 
> assertEquals("Get a wrong content type", "text/plain", data.getContentType());
> within the route causes a 500 error to be seen by the client (there is no logging to the display of the assertion failure).
> Further investigation has shown that:
> 1. The content-type sent with the HTTP request (for the file part) is always "application/octet-stream", the default for FilePart - this does not appear to be what is desired (the CamelFilePart class would fix it, but this doesn't seem to be used).
> 2. The content-type for file parts is not made available by jetty, so data.getContentType() always returns the default content-type for the DataHandler class.
> 3. Different DataHandler implementations have different default content-types (Sun has "text/plain", OpenJDK has "application/octet-stream").
> It is the last difference that causes the build break, but that should be irrelevant if the other two things were fixed.
> I have raised [https://bugs.eclipse.org/bugs/show_bug.cgi?id=349110] against jetty to try to get the content type made available, but until that happens I've got a patch to simply remove the incorrect assertion.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CAMEL-4094) Build failure for camel-jetty, which displays bigger problems with content-type handling for multipart forms

Posted by "Yaytay (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-4094?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Yaytay updated CAMEL-4094:
--------------------------

    Attachment: Patch.diff

Note that this patch also renames MultiPartFormTestWithCustomFilter to MultiPartFormWithCustomFilterTest because it doesn't run automatically.

The change to MultiPartFormTestWithCustomFilter and MultiPartFormTest is the same, comment out a test and add a comment to say why it can't currently be fixed.

> Build failure for camel-jetty, which displays bigger problems with content-type handling for multipart forms
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-4094
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4094
>             Project: Camel
>          Issue Type: Test
>          Components: camel-http, camel-jetty
>    Affects Versions: 2.7.2
>         Environment: OpenJDK displays the problem, but actually there is an issue with all platforms.
>            Reporter: Yaytay
>            Priority: Minor
>         Attachments: Patch.diff
>
>
> Camel-jetty has a build failure in MultiPartFormTest when built with OpenJDK.
> The assertion 
> assertEquals("Get a wrong content type", "text/plain", data.getContentType());
> within the route causes a 500 error to be seen by the client (there is no logging to the display of the assertion failure).
> Further investigation has shown that:
> 1. The content-type sent with the HTTP request (for the file part) is always "application/octet-stream", the default for FilePart - this does not appear to be what is desired (the CamelFilePart class would fix it, but this doesn't seem to be used).
> 2. The content-type for file parts is not made available by jetty, so data.getContentType() always returns the default content-type for the DataHandler class.
> 3. Different DataHandler implementations have different default content-types (Sun has "text/plain", OpenJDK has "application/octet-stream").
> It is the last difference that causes the build break, but that should be irrelevant if the other two things were fixed.
> I have raised [https://bugs.eclipse.org/bugs/show_bug.cgi?id=349110] against jetty to try to get the content type made available, but until that happens I've got a patch to simply remove the incorrect assertion.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira