klacke/yaws — Issue #75: Big file upload triggers crash
Author: kristofferkoch
Created: 2011-12-27 16:12:08+00:00
State: open

When uploading a 2GB file, yaws crashes with the following message:

=ERROR REPORT==== 27-Dec-2011::17:04:42 ===
Yaws process died: {{badmatch,{error,einval}},
[{yaws,setopts,3},
{yaws,http_recv_request,2},
{yaws,do_http_get_headers,2},
{yaws,http_get_headers,2},
{yaws_server,aloop,3},
{yaws_server,acceptor0,2},
{proc_lib,init_p_do_apply,3}]}

The uploaded file is created with `dd if=/dev/zero of=/tmp/bigfile bs=1M count=2048`. Running yaws 1.91-2 on ubuntu.

Furthermore, I don't seem to receive any `{part_body, Data}` tuples, only one humongous `{body, Data}` when handling more sane file sizes.