Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 1.6.1
-
Component/s: ICE-Components
-
Labels:None
-
Environment:jsf 1.2, jboss 4.2, windows
-
ICEsoft Forum Reference:
-
Support Case References:
-
Affects:Documentation (User Guide, Ref. Guide, etc.)
Description
There seems to be a bug in apache file upload 1.2 which causes files which are 44 bytes or less to not be uploaded.
44 bytes is the length of the delimiter between parts of the multi-part stream. It seems that if the contents of the file is less than the size of the stream delimiter, then the input stream returns 0 bytes from the stream.
44 bytes is the length of the delimiter between parts of the multi-part stream. It seems that if the contents of the file is less than the size of the stream delimiter, then the input stream returns 0 bytes from the stream.
Activity
Philip Breau
created issue -
Philip Breau
made changes -
Field | Original Value | New Value |
---|---|---|
Support Case References | https://www.icesoft.ca:4443/supportilla/show_bug.cgi?id=4379 |
Ken Fyten
made changes -
Fix Version/s | 1.7DR#3 [ 10112 ] | |
Assignee | Yip Ng [ yip.ng ] |
yip.ng
made changes -
Attachment | screenshot-1.jpg [ 10753 ] |
yip.ng
made changes -
Attachment | screenshot-2.jpg [ 10758 ] |
Ken Fyten
made changes -
Fix Version/s | 1.7 [ 10080 ] | |
Fix Version/s | 1.7DR#3 [ 10112 ] | |
Assignee | Yip Ng [ yip.ng ] | Philip Breau [ philip.breau ] |
Repository | Revision | Date | User | Message |
ICEsoft Public SVN Repository | #15361 | Wed Dec 12 17:49:13 MST 2007 | yip.ng | Set minimum width of input + button fields of popup calendar. |
Files Changed | ||||
MODIFY
/icefaces/trunk/icefaces/component/src/com/icesoft/faces/component/selectinputdate/SelectInputDateRenderer.java
|
Ken Fyten
made changes -
Assignee | Philip Breau [ philip.breau ] | Yip Ng [ yip.ng ] |
Ken Fyten
made changes -
Affects | [Documentation (User Guide, Ref. Guide, etc.)] | |
Assignee Priority | P1 |
Repository | Revision | Date | User | Message |
ICEsoft Public SVN Repository | #15812 | Fri Feb 15 11:43:53 MST 2008 | yip.ng | New version (1.3-SNAPSHOT) to fix bug in https file upload of small files from Firefox. |
Files Changed | ||||
MODIFY
/icefaces/trunk/icefaces/lib/commons-fileupload.jar
MODIFY /icefaces/trunk/icefaces/lib/versions-licenses.html |
yip.ng
made changes -
Attachment | screenshot-3.jpg [ 10821 ] |
yip.ng
made changes -
Status | Open [ 1 ] | Resolved [ 5 ] |
Resolution | Fixed [ 1 ] |
Ken Fyten
made changes -
Fix Version/s | 1.7RC1 [ 10123 ] | |
Fix Version/s | 1.7 [ 10080 ] |
Ken Fyten
made changes -
Fix Version/s | 1.7 [ 10080 ] |
Ken Fyten
made changes -
Status | Resolved [ 5 ] | Closed [ 6 ] |
Assignee Priority | P1 | |
Assignee | Yip Ng [ yip.ng ] |
suggested fix:
Index: D:/Documents and Settings/pbreau/workspace/ICEfaces/component/src/com/icesoft/faces/component/inputfile/InputFile.java
===================================================================
— D:/Documents and Settings/pbreau/workspace/ICEfaces/component/src/com/icesoft/faces/component/inputfile/InputFile.java (revision 15197)
+++ D:/Documents and Settings/pbreau/workspace/ICEfaces/component/src/com/icesoft/faces/component/inputfile/InputFile.java (working copy)
@@ -59,7 +59,7 @@
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
-import java.io.OutputStream;
+import java.io.FileWriter;
import java.io.Serializable;
import java.io.Writer;
import java.util.ArrayList;
@@ -67,6 +67,7 @@
import java.util.Iterator;
+
/**
*/
@@ -195,15 +196,29 @@
if (!folderFile.exists())
folderFile.mkdirs();
file = new File(folder, fileName);
+ FileOutputStream output = new FileOutputStream(file);
+ byte[] buff = new byte[8192];
+ Streams.copy(stream.openStream(), output, true, buff);
+
+ //
ICE-2237workaround for Commons File Upload not properly+ //uploading small files through SSL
+ if (file.length() == 0 && buff[0] != 0)
else if (file.length() == 0)
{ + setProgress(0); + file.delete(); + throw new FileUploadBase.FileUploadIOException( + new FileUploadBase.InvalidContentTypeException()); + }status = SAVED;
fileInfo.setPhysicalPath(file.getAbsolutePath());
updateFileValueBinding(context);
notifyDone(bfc);