mirror of
https://github.com/kennethreitz/httpbin.git
synced 2026-06-05 14:50:17 +00:00
Set 10MB limit on /drip
This commit is contained in:
+1
-1
@@ -454,7 +454,7 @@ def drip():
|
||||
"""Drips data over a duration after an optional initial delay."""
|
||||
args = CaseInsensitiveDict(request.args.items())
|
||||
duration = float(args.get('duration', 2))
|
||||
numbytes = int(args.get('numbytes', 10))
|
||||
numbytes = min(int(args.get('numbytes', 10)),(10 * 1024 * 1024)) # set 10MB limit
|
||||
code = int(args.get('code', 200))
|
||||
pause = duration / numbytes
|
||||
|
||||
|
||||
Reference in New Issue
Block a user