Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Critical
-
Resolution: Fixed
-
Affects Version/s: 3.1.1
-
Fix Version/s: 3.1.4 (EE only), 3.2.1
-
Component/s: Modules: Jersey
-
Environment:
Fedora 15
java-1.6.0-openjdk-1.6.0.0-58.1.10.2.fc15.i686
-
User impact:High
-
Configuration:
-
Log Output:
-
Similar Issues:None
Description
I wrote a Jersey class that was supposed to accept a multipart/form-data encoded POST from a html form. It returned a 400 error. Digging into the actual problem, I found that a MIMEParsingException is being thrown by mimepull (a Jersey dependency). The body of the post is getting corrupted somehow. I've confirmed that the Jersey class is working correctly by deploying it in a Jetty container and testing it there.
Until this gets fixed, I can't create a web service that accepts files
The original report is at http://forums.mulesoft.org/thread.jspa?messageID=16784#16784
Issue Links
- is duplicated by
-
MULE-5828
POSTing a multipart/form-data message w/o a payload parameter throws IllegalArgumentException
-
Activity
| Field | Original Value | New Value |
|---|---|---|
| Configuration |
<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:spring="http://www.springframework.org/schema/beans" xmlns:jersey="http://www.mulesoft.org/schema/mule/jersey" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/3.1/mule.xsd http://www.mulesoft.org/schema/mule/jersey http://www.mulesoft.org/schema/mule/jersey/3.0/mule-jersey.xsd http://jersey.apache.org/core http://jersey.apache.org/schemas/core.xsd"> <flow name="X12ToSummaryHtml"> <inbound-endpoint address="http://localhost:8080/jersey" /> <jersey:resources> <component class="com.optuminsight.unionstation.service.X12ToSummaryHtml" /> </jersey:resources> </flow> </mule> @POST @Path("/getSummaryHtml") @Consumes(MediaType.MULTIPART_FORM_DATA) @Produces("text/html") public final Response getSummaryHtml(@FormDataParam("x12file") final InputStream x12file) throws IOException { LOG.info("called getSummaryHtml"); return Response.ok(IOUtils.toString(x12file)).build(); } |
{code:xml}<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:spring="http://www.springframework.org/schema/beans" xmlns:jersey="http://www.mulesoft.org/schema/mule/jersey" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/3.1/mule.xsd http://www.mulesoft.org/schema/mule/jersey http://www.mulesoft.org/schema/mule/jersey/3.0/mule-jersey.xsd http://jersey.apache.org/core http://jersey.apache.org/schemas/core.xsd"> <flow name="X12ToSummaryHtml"> <inbound-endpoint address="http://localhost:8080/jersey" /> <jersey:resources> <component class="com.optuminsight.unionstation.service.X12ToSummaryHtml" /> </jersey:resources> </flow> </mule> {code} {code:java} @POST @Path("/getSummaryHtml") @Consumes(MediaType.MULTIPART_FORM_DATA) @Produces("text/html") public final Response getSummaryHtml(@FormDataParam("x12file") final InputStream x12file) throws IOException { LOG.info("called getSummaryHtml"); return Response.ok(IOUtils.toString(x12file)).build(); } {code} |
| Priority | Blocker [ 1 ] | Critical [ 2 ] |
| Assignee | Santiago Vacas [ svacas ] |
| Status | Open [ 1 ] | In Progress [ 3 ] |
| Fix Version/s | 3.1.4 [ 11079 ] | |
| Fix Version/s | 3.2.1 [ 11078 ] |
| Status | In Progress [ 3 ] | To Be Merged [ 10001 ] |
| Status | To Be Merged [ 10001 ] | Reopened [ 4 ] |
| Status | Reopened [ 4 ] | Closed [ 6 ] |
| Resolution | Fixed [ 1 ] |
| Link | This issue is duplicated by EE-2493 [ EE-2493 ] |
| Transition | Time In Source Status | Execution Times | Last Executer | Last Execution Date | |||||
|---|---|---|---|---|---|---|---|---|---|
|
90d 3h 49m | 1 | Santiago Vacas | 29/Sep/11 03:42 PM | |||||
|
3m 28s | 1 | Santiago Vacas | 29/Sep/11 03:45 PM | |||||
|
12d 21h 50m | 1 | Ben Mathews | 12/Oct/11 01:36 PM | |||||
|
5d 13h 56m | 1 | Dirk Olmes | 18/Oct/11 03:32 AM |
- Repository mule on http://foo.bar/ failed: Error in remote call to 'FishEye 0 (http://foo.bar/)' (http://foo.bar) [AbstractRestCommand{path='/rest-service-fe/changeset-v1/listChangesets/', params={expand=changesets[-21:-1].revisions[0:29], comment=MULE-5628, p4JobFixed=MULE-5628, rep=mule}, methodType=GET}] : java.net.UnknownHostException: foo.bar
I have encounter the same issue running Mule 3.2.0. Is someone looking into this? Multipart/form-data encoding is a requirement for my project and this fix is mission-critical.