Strange file upload behaviour with https

13 views
Skip to first unread message

leo

unread,
Nov 12, 2009, 10:45:25 PM11/12/09
to web2py-users
I run into some weirdness when submitting a form that contains a file
upload field. I am using the auto-generated form in the appadmin page
that inserts new records into a database table with an upload field.

File sizes over a certain limit (not very large, only around 100kb)
make the upload last disproportionally longer after clicking the
'submit' button (i.e., 99kb uploads almost instantaneously; 100kb
lasts for several seconds), and then the browser comes back with a
completely blank page (no ticket, no error message, nothing), and no
database insert has actually taken place.

This strangeness occurs only when connecting using https (server
started with the -c server.crt -k server.key arguments). With an
ordinary http connection everything works fine with any upload file
size.

I have been able to nail it down to an exact file size that still
uploads correctly; add one byte to it, and it hangs. It seems to have
something to do with the total POST size being sent to the server,
because when I add one more character to one of the other fields in
the form, I have to reduce the file size by one byte to make it work.

Has anyone run into a phenomenon like this in the past?

Best wishes,
Leo

mdipierro

unread,
Nov 13, 2009, 1:46:41 AM11/13/09
to web2py-users
This is a limitation of the wsgiserver that comes with web2py. In a
production environment if you use apache+mod_wsgi you will not have
this problem.

leo

unread,
Nov 13, 2009, 10:23:06 AM11/13/09
to web2py-users
Understood. Grazie mille, Massimo. And thanks for the excellent
framework. I have been working with it only for a few days now, and
it promises to be a huge time-saver.

Leo
Reply all
Reply to author
Forward
0 new messages