Menu

#5 :keep-alive and multipart encoding

open
nobody
None
5
2000-07-27
2000-07-27
No

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

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.