From 0417f41c0ae50eb2027a5109b85dbf1f103b1c80 Mon Sep 17 00:00:00 2001 From: Fredrik Tolf Date: Thu, 30 Aug 2012 16:10:53 +0200 Subject: [PATCH] Use the limited reader for reading form data. --- wrw/form.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wrw/form.py b/wrw/form.py index 9f1e6d4..98157c0 100644 --- a/wrw/form.py +++ b/wrw/form.py @@ -6,7 +6,7 @@ __all__ = ["formdata"] class formwrap(object): def __init__(self, req): if req.ihead.get("Content-Type") == "application/x-www-form-urlencoded": - self.cf = cgi.parse(environ = req.env, fp = req.env["wsgi.input"]) + self.cf = cgi.parse(environ = req.env, fp = req.input) else: self.cf = cgi.parse(environ = req.env) @@ -73,7 +73,7 @@ class formpart(object): if sz >= 0 and len(self.buf) >= sz: break while len(self.form.buf) <= len(lboundary): - ret = req.env["wsgi.input"].read(8192) + ret = req.input.read(8192) if ret == "": raise badmultipart("Missing last multipart boundary") self.form.buf += ret -- 2.11.0