Huge memory allocation using SSL with webdav
|Missing in 1.5.x:|
I'm using the lighttpd mod_webdav over SSL. When I transfer big files (about 100~200 MByte) to the webdav-server lighttpd allocates very much memory.
As I looked through the source I have seen that there is a loop in connections.c which reads as much data as possible from the SSL-Socket before the request is written to tempfiles on disk. In my case this means that the whole file was read into memory in this loop.
I have made a very small change which resolves my problem. The loop is left either when no more data is read from SSL or 5 MByte data is read. Now the memory consumption is much lower than before.
Also available in: Atom