projects
/
pyassuan.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bf85529
)
No binary 'D ' requests from the client.
author
W. Trevor King
<wking@tremily.us>
Sat, 21 Apr 2012 16:29:21 +0000
(12:29 -0400)
committer
W. Trevor King
<wking@tremily.us>
Sat, 21 Apr 2012 16:29:21 +0000
(12:29 -0400)
pyassuan/common.py
patch
|
blob
|
history
diff --git
a/pyassuan/common.py
b/pyassuan/common.py
index 7c979cbcfb18efe73a5cd317fa29fe7c7f65fada..2beed99b31ec46010e045e8d688f5b0ab1a93961 100644
(file)
--- 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')