Issue #546 resolved

[PATCH] concurrent file uploading limits, possible additional tracking features

Anonymous created an issue

As discussed on [ the mailing list] it would be nice to allow the configuration of cp to limit the number of concurrent file uploads, simply to avoid tying up all available threads.

A few other improvements to file uploads could be added as well... The filter I wrote for 2.2 (attached) offers a few additional features that aren't completely necessary for v3, but would be useful (upload status, minimum up speeds, etc). The explicit declaration of file-accepting functions seems like a must to me, though, simply to prevent sites that don't even accept files from becoming subject to some simply implemented dos.

Reported by tweekgeek

Comments (8)

  1. Anonymous

    The idea is very nice but should it be included into core? Really I don't know. It might be interesting to have a cherrypy.extra project on the side of core that gathers those "very handy recipes" without polluting the core.

  2. michele

    Adding cherrypy-extras keywork, even I find them useful to have inside the core I think the tracking features *could* belong to such a package (fumanchu should decide).

  3. Robert Brewer

    Closing as 'wontfix', because 1) as-is, it's more appropriate as a third-party tool, 2) the core would prefer each feature to be separated into a smaller Tool, and 3) much of it can be done using existing tools:

    • upload_timeout: CP 3 has a new deadlock monitor in conjunction with request.timeout, with a hook users can put inside their own equivalent to ProgressFile.
    • upload_maxsize: duplicates max_request_body_size
    • upload_minspeed: the only reason to inspect this is for the side-effect that the conn doesn't hang open too long, which can be solved better with request.timeout.
    • upload_limit: if you really want to reserve some threads for uploads and some for "other", CP 3 allows you to start another HTTP server, which you could dedicate on its own port for that purpose. This might be useful as a standalone CP 3 Tool.
    • explicit/declared: good idea, but is better done with an Allow header and the "405 Method Not Allowed" response. This functionality should be available orthogonally to an upload tool (and is, in CP 3's MethodDispatcher).

    The "eta" functionality is a nice thing to have, but should be developed independently.

  4. Log in to comment