Downstream ticket:
http://trac.transmissionbt.com/ticket/1217
Background: Transmission is processing some pretty large request, so I increased the IO buffers size in the "Set IO buffers" section of add_socket() by increasing the value of URI_MAX.
Unfortunately when I increased this to 64k, it appears to be smashing the stack because there are a couple of places in shttpd where a char array of URI_MAX bytes is allocated.
Issue #1: decouple the dual use of URI_MAX, and add a separate #define in config.h to set the IO buffer size. (Though, it looks like this won't be necessary in your redesign.)
Issue #2: you may want to consider allocating those buffers on the heap instead of on the stack. The downstream ticket has a 1.42 patch to do this, and also avoids some minor overhead in the logging code.
Logged In: NO
The patch:
http://trac.transmissionbt.com/attachment/ticket/1217/uri-heap.2.diff