From 054c92077e3e94fadc2806cd5188d5185835f16e Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Sat, 21 Apr 2012 12:29:21 -0400 Subject: [PATCH] No binary 'D ' requests from the client. --- pyassuan/common.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/pyassuan/common.py b/pyassuan/common.py index 7c979cb..2beed99 100644 --- a/pyassuan/common.py +++ b/pyassuan/common.py @@ -153,11 +153,7 @@ class Request (object): def from_bytes(self, line): if len(line) > 1000: # TODO: byte-vs-str and newlines? raise _error.AssuanError(message='Line too long') - if line.startswith(b'D '): - self.command = 'D' - self.parameters = decode(line[2:]) - else: - line = str(line, encoding='utf-8') + line = str(line, encoding='utf-8') match = _REQUEST_REGEXP.match(line) if not match: raise _error.AssuanError(message='Invalid request') -- 2.26.2