Skip to content

Scrapy, a fast high-level web crawling & scraping framework for Python.

correctly process arguments for bench server

Mikhail Korobova18dc24471f1
diff --git a/scrapy/utils/benchserver.py b/scrapy/utils/benchserver.py
index a9a2c938e..5bbda6e27 100644
--- a/scrapy/utils/benchserver.py
+++ b/scrapy/utils/benchserver.py
@@ -13,8 +13,8 @@ class Root(Resource):
return self
def render(self, request):
- total = _getarg(request, 'total', 100, int)
- show = _getarg(request, 'show', 10, int)
+ total = _getarg(request, b'total', 100, int)
+ show = _getarg(request, b'show', 10, int)
nlist = [random.randint(1, total) for _ in range(show)]
request.write(b"<html><head></head><body>")
args = request.args.copy()