Return-Path: X-Original-To: apmail-camel-dev-archive@www.apache.org Delivered-To: apmail-camel-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5712C44B9 for ; Sun, 12 Jun 2011 13:55:16 +0000 (UTC) Received: (qmail 12222 invoked by uid 500); 12 Jun 2011 13:55:16 -0000 Delivered-To: apmail-camel-dev-archive@camel.apache.org Received: (qmail 12192 invoked by uid 500); 12 Jun 2011 13:55:16 -0000 Mailing-List: contact dev-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list dev@camel.apache.org Received: (qmail 12184 invoked by uid 99); 12 Jun 2011 13:55:15 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 12 Jun 2011 13:55:15 +0000 X-ASF-Spam-Status: No, hits=-1998.7 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD,URI_HEX X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 12 Jun 2011 13:55:14 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id D49AA41556A for ; Sun, 12 Jun 2011 13:54:54 +0000 (UTC) Date: Sun, 12 Jun 2011 13:54:54 +0000 (UTC) From: "Yaytay (JIRA)" To: dev@camel.apache.org Message-ID: <1487035510.883.1307886894867.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <948808448.881.1307886651754.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (CAMEL-4094) Build failure for camel-jetty, which displays bigger problems with content-type handling for multipart forms MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ 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