Subject: [BugDB] SSL problem question (PR#692)

From: [email-masked]
Date: Mon, 8 Apr 2002 18:15:22 +0200 (MET DST)

Full_Name: Jaymes Redus
Version: Apache version 1.3.12 mod_ssl 2.6.2
OS: Windows 2000
Submission from: (NULL) (208.63.63.94)

Hi my name is Jaymes Redus and I work with Affliated Computer Systems here in
Tallahassee, I just wanted to ask a question concerning a SSL issue that we are
having. We are having a problem with our Upload functionality on our Web
Application. It seems that if a customer
tries to upload a file or text file(encrypted) that's under 57 MB it works fine
but if the file is 58 MB(encrypted) or higher the upload fails.
 
So in other words all files that are under 57 MB(encrypted)
 and the SSL layer is enabled works fine, but all files that are uploaded that
are more than 57MB(encrypted) with the SSL enabled the upload fails. I have
tried the same upload function with the SSL disabled and files 57 MB and higher
and lower works fine. It seems that once the SSL  is activated large files are
not able to be uploaded. Can you help us with this problem?

A cgi script written internally in C++ ...The funny thing is that the you can
upload the kitchen sink without the SSL..... works like a charm. But when you
put SSL in the mix problems occur. The SSL handshake occurs and the file starts
to upload then all of the sudden the SSL connection is lost. To throw in another
curve ball we have a download script written in C++ as well almost identical to
the upload script and that has been working fine no problems. Weird.....

______________________________________________________________________
Apache Interface to OpenSSL (mod_ssl)                   www.modssl.org
User Support Mailing List                      [email-masked]
Automated List Manager                            [email-masked]

---

From: Cliff Woolley <[email-masked]>
Date: Mon, 8 Apr 2002 21:35:02 -0400 (EDT)

On Mon, 8 Apr 2002 [email-masked] wrote:

> Hi my name is Jaymes Redus and I work with Affliated Computer Systems
> here in Tallahassee, I just wanted to ask a question concerning a SSL
> issue that we are having. We are having a problem with our Upload
> functionality on our Web Application. It seems that if a customer tries
> to upload a file or text file(encrypted) that's under 57 MB it works
> fine but if the file is 58 MB(encrypted) or higher the upload fails.

Several Win32 system calls have (ridiculous) hidden limits right around
the 56-57MB limit.  Among the ones I've seen that fail when passed more
data than that in a single call:

    WriteFile()
    TransmitFile()

I'm willing to bet you're using WriteFile().  If so, make sure you check
its return code for errors.  You'll get back something like
ERROR_INSUFFICIENT_RESOURCES (or something like that, I don't remember
exactly what it is off the top of my head).  You'd have to loop on the
WriteFile() call and pass it bite-sized chunks to get it to work.

But in general, do you really want a web application buffering that much
in memory?  Surely not.

--Cliff

--------------------------------------------------------------
   Cliff Woolley
   [email-masked]
   Charlottesville, VA