[
https://issues.apache.org/jira/browse/WICKET-2015?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12662432#action_12662432
]
Carsten Behring commented on WICKET-2015:
-----------------------------------------
I found back the line where this case seems to create the problem.
If you debug your stuff (without having the file upload set), the code will get
an exception in MultiPartFormInputStream, method "skipPreamble":
It ends up in the MalformedStreamException, which is swallowed and "false" is
returned.
Maybe this finished the submission and nothing happens.
public boolean skipPreamble() throws IOException
{
// First delimiter may be not preceeded with a CRLF.
System.arraycopy(boundary, 2, boundary, 0, boundary.length - 2);
boundaryLength = boundary.length - 2;
try
{
// Discard all data up to the delimiter.
discardBodyData();
// Read boundary - if succeeded, the stream contains an
// encapsulation.
return readBoundary();
}
catch (MalformedStreamException e)
{
return false;
}
finally
{
// Restore delimiter.
System.arraycopy(boundary, 0, boundary, 2,
boundary.length - 2);
boundaryLength = boundary.length;
boundary[0] = CR;
boundary[1] = LF;
}
}
The exception has as cause: MalformedStreamException: Stream ended unexpectedly
I looked further and the debugger showd that this methods throws the exception
: discardBodyData()
By assigning a value to the fileUploadComponent the code does not throw any
exception at that point.
> Empty File Upload field breaks validation of other fields in WicketTester.
> --------------------------------------------------------------------------
>
> Key: WICKET-2015
> URL: https://issues.apache.org/jira/browse/WICKET-2015
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 1.4-RC1
> Environment: Windows XP SP3, Eclipse IDE, Wicket 1.4-rc1.
> Reporter: Kari Maja
> Attachments: WicketQuickstart.zip
>
>
> Submitting form with empty File Upload -field malfunctions in WicketTester in
> following way:
> - Invalid input on TextField does not trigger fields
> .setRequired(true)-validation.
> - Valid input on DropDownChoise is not accepted.
> If File Upload -field is filled, then validations function fine when
> submitting form in WicketTester.
> Submitting form normally through web browser does not trigger this bug. It is
> shown in WicketTester only.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.