mozes/stompest — pull request #4 by nikipore (2012-06-17 19:26:38+00:00)
Title: added support for binary content

* Added support for binary bodies: according to STOMP spec, the header content-length=N suppresses evaluation of the null character for the first N characters read.
* Streamlined a few things, in particular the dangerous mutable default arguments in simple.py

--
Suggestion for future refactoring: make the parser stream (character-wise) instead of line (line-wise) oriented and move all parsing logic into the parser: There is left-over parsing functionality, for instance, in simple.Stomp.receiveFrame() which should be moved into the parser which should accept streams (=iterable of characters). Because of the single responsibility principle I believe that the long-term goal should be to improve the stomper parser to support streams and make the stomper parser obsolete.