Fixes Ilegal chunk encoding by the test_client

test_client sends a wrong size indication when testing
chunked data.
For example instead of sending:
 5\r\nabcde\r\n (which is inline with the standard)
The client would send:
 0x5\r\nabcde\r\n
On branch bp/wsgi-application-interface-2
 modified: test/functional/swift_test_client.py
Change-Id: I7597dcd24adade009aead66f67674f361f3fe4fa
Fixes: Bug #1070036
Implements: Blueprint wsgi-application-interface
This commit is contained in:
David Hadas
2012年10月23日 00:23:43 +02:00
parent 22a8adfcb9
commit 2531df96a0

View File

@@ -280,7 +280,7 @@ class Connection(object):
def put_data(self, data, chunked=False):
if chunked:
self.connection.send('%s\r\n%s\r\n' % (hex(len(data)), data))
self.connection.send('%x\r\n%s\r\n' % (len(data), data))
else:
self.connection.send(data)
Reference in New Issue
openstack/swift
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.

The note is not visible to the blocked user.