Hi,
I have encountered another bug in multipart content encoding. If :keep-alive is turned on when parsing multipart content, then with-http-body attempts to drain the input socket stream before sending the body. However, multipart parsing does not use the usual mechanism involving request-query, so with-http-body attempts to drain an already empty stream. This causes the server to hang until timeout before the response is returned to the client.
The only viable solution I see for this problem is to make request-query multipart encoding aware. However, caching the body of a multipart encoding doesn't seem like a good idea either, as a file upload can potentially be a rather large object. May I suggest some mechanism that allows the programmer to override the manner in which the query value is handled? For parsing multipart bodies, I have employed an object dispatch approach that appears to work rather well in the context of LSP. If you would like this code, I can send you a copy.
Regards,
Sunil