No binary 'D ' requests from the client.
authorW. Trevor King <wking@tremily.us>
Sat, 21 Apr 2012 16:29:21 +0000 (12:29 -0400)
committerW. Trevor King <wking@tremily.us>
Sat, 21 Apr 2012 16:29:21 +0000 (12:29 -0400)
pyassuan/common.py

index 7c979cbcfb18efe73a5cd317fa29fe7c7f65fada..2beed99b31ec46010e045e8d688f5b0ab1a93961 100644 (file)
@@ -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')