You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Antony Quinn <aq...@ebi.ac.uk> on 2006/08/06 01:36:59 UTC

File upload exception over SSL: "Malformed stream"

Hello,

I have a pipeline to handle file uploads using a custom action that
works fine over HTTP but not over HTTPS (SSL). There is no error message
in the log files, just a "Malformed stream" message sent to the browser
(details below). I've tried with Firefox 1.5 on Windows and Linux, and
IE6 on Windows, but always see the same error message.

Can you help?

Any assistance would be much appreciated.

Thanks,

Antony

Error message:

Problem in creating the Request
Message: null
Description: No details available.
Sender: org.apache.cocoon.servlet.CocoonServlet
Source: Cocoon Servlet
cause
Malformed stream

Pipeline:

<map:match pattern="protected/upload">
   <map:act type="file-upload">
     <map:parameter name="directory"
value="{naming:java:comp/env/upload-directory}/{request:remoteUser}" />
     </map:act>
   <map:redirect-to uri="admin.html"/>
</map:match>

Code:

// Get the file
Part part = (Part) request.get("upload-file");
...
// Save the file
String uploadName = part.getUploadName();
// Strip off path (IE on Windows includes it)
uploadName = uploadName.substring(uploadName.lastIndexOf('\\') + 1);
String path = directory + File.separator + uploadName;
part.copyToFile(path);





---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org