Change in vdsm[master]: stomp: Stomp encoder\decoder improvements
piotr.kliczewski at gmail.com
piotr.kliczewski at gmail.com
Fri Apr 10 12:48:27 UTC 2015
Piotr Kliczewski has posted comments on this change.
Change subject: stomp: Stomp encoder\decoder improvements
......................................................................
Patch Set 13:
(3 comments)
https://gerrit.ovirt.org/#/c/35255/13//COMMIT_MSG
Commit Message:
Line 7: stomp: Stomp encoder\decoder improvements
Line 8:
Line 9: We need to make sure to escape special characters during encoding and
Line 10: decoding.
Line 11: During encoding we want to use string join vs using '+' due to its
> maybe reads better as
Will update the message
Line 12: speed.
Line 13:
Line 14: Change-Id: I341e46463e654ae0a086cd49af18aa336b86cb6e
Line 15: Signed-off-by: Saggi Mizrahi <smizrahi at redhat.com>
https://gerrit.ovirt.org/#/c/35255/13/lib/yajsonrpc/stomp.py
File lib/yajsonrpc/stomp.py:
Line 199:
Line 200: if len(header) > 0 and header[-1] == '\r':
Line 201: header = header[:-1]
Line 202:
Line 203: headers = self._tmpFrame.headers
> why this was moved below here?
The only reason I see that original author had was that is was not used earlier so the line was moved just to have it before 'headers' is used.
Line 204: if header == "":
Line 205: self._contentLength = int(headers.get('content-length', -1))
Line 206: self._state = self._STATE_BODY
Line 207: return True
https://gerrit.ovirt.org/#/c/35255/13/tests/encodingTests.py
File tests/encodingTests.py:
Line 20: from testlib import (
Line 21: VdsmTestCase as TestCaseBase,
Line 22: expandPermutations,
Line 23: permutations
Line 24: )
> A little golang-ish, we don't usually write like this - but I don't really
OK
Line 25: from yajsonrpc.stomp import decodeValue, encodeValue
Line 26:
Line 27: PERMUTATIONS = (('accept-version',),
Line 28: ('1.2:',),
--
To view, visit https://gerrit.ovirt.org/35255
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I341e46463e654ae0a086cd49af18aa336b86cb6e
Gerrit-PatchSet: 13
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Saggi Mizrahi <smizrahi at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Dima Kuznetsov <dkuznets at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczewski at gmail.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
More information about the vdsm-patches
mailing list