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:54:54 UTC

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

    [ 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