On 5 Feb 2010, at 20:54, Bill Moseley wrote:
AFAIK, there's no way to stream parse JSON (so that only part is in memory at any given time). What would be the recommended serialization for uploaded files -- just use multipart/form-data for the uploads?
Don't? Why not just do a PUT request with all the data as unmangled binary?
BTW -- I don't see any code in HTTP::Body to limit body size. Doesn't that seem like a pretty easy DoS for Catalyst apps? I do set a request size limit in the web server, but if I need to allow 1/2GB uploads or so then could kill the machine pretty easily, no?
Well, you set it at the web server.. That stops both overlarge content- length requests, and when the body exceeds the specified content length.
But yes, you have to provision temp file space for n files in flight x max file size...
(I have an HTTP::Body subclass I use to stream stuff directly into mogilefs rather than getting a temp file - code on request)...
Cheers t0m _______________________________________________ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/