[ 
https://issues.apache.org/jira/browse/FILEUPLOAD-301?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Michael Osipov closed FILEUPLOAD-301.
-------------------------------------
    Resolution: Not A Problem

> Problems uploading files greater than 100kb using HTTPS
> -------------------------------------------------------
>
>                 Key: FILEUPLOAD-301
>                 URL: https://issues.apache.org/jira/browse/FILEUPLOAD-301
>             Project: Commons FileUpload
>          Issue Type: Bug
>    Affects Versions: 1.2.2, 1.4
>         Environment:  
> Apache Tomcat 8.5
> java 9.0.4
> Windows Server 2016 Datacenter
>            Reporter: Andrea
>            Priority: Major
>
> I'have a java web app that uses Apache Commons FileUpload for uploading files 
> using servlets. 
> My base code worked perfectly for years on a plain http environment (Apache 
> Tomcat 8.5).
> I've changed my environment to work with HTTPS, using a Let's Encrypt 
> certificate using connector configured with 
> org.apache.coyote.http11.Http11AprProtocol.
> My uploads now suddenly fail if files are greater than 100kb. Same files 
> uploaded successfully using plain HTTP environment. 
> This is the exception logged: 
>    
> {{org.apache.commons.fileupload.FileUploadBase$IOFileUploadException: 
> Processing of multipart/form-data request failed. java.io.IOException: The 
> socket [925,024,592] associated with this connection has been closed.}}
> this is the code fragment i use for manage request:
>      
> {{DiskFileItemFactory factory = new DiskFileItemFactory();   }}
> {{File repository = (File)                    
> request.getServletContext().getAttribute("javax.servlet.context.tempdir");   
> factory.setRepository(repository);   }}
> {{ServletFileUpload upload = new ServletFileUpload(factory);   
> upload.setHeaderEncoding(encoding);    }}
> {{multipartItems = upload.parseRequest(request);}}
>  
> Tomcat settings: 
>  
> {{<Connector  port="80" protocol="HTTP/1.1" connectionTimeout="20000"       
> redirectPort="443"   />}}
> {{}}
> {{<Connector  port="443" 
> protocol="org.apache.coyote.http11.Http11AprProtocol"        maxThreads="150" 
> SSLEnabled="true" >        }}
> {{<UpgradeProtocol className="org.apache.coyote.http2.Http2Protocol" />       
>  <SSLHostConfig>            }}
> {{<Certificate  certificateKeyFile="D:/prj/certificati/private.key"           
>      certificateFile="D:/prj/certificati/certificate.crt"                
> certificateChainFile="D:/prj/certificati/ca_bundle.crt"                
> type="RSA"  />        }}
> {{</SSLHostConfig>    }}
> {{</Connector>}}
> Thanks 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to