S
subeen
Hi,
I am trying to send compressed data to a server written in django. But
it shows error while decompressing the data in the server. After some
experiment I found that the server is not receiving the exact data I
am sending.
data = 'hello, this is a test message this is another message'
data = zlib.compress(data)
# now it looks like: x��H����Q(��,V�D�����������T�p^~IFjL�e
# length is 45
in django (view) I receive it:
data = request.POST['data']
# now it looks like: x����Q(�,V�D�������^~IFjL�e
# length is 34
Can anybody help me understand the issue and how to get over?
thanks,
Subeen.
http://love-python.blogspot.com
I am trying to send compressed data to a server written in django. But
it shows error while decompressing the data in the server. After some
experiment I found that the server is not receiving the exact data I
am sending.
data = 'hello, this is a test message this is another message'
data = zlib.compress(data)
# now it looks like: x��H����Q(��,V�D�����������T�p^~IFjL�e
# length is 45
in django (view) I receive it:
data = request.POST['data']
# now it looks like: x����Q(�,V�D�������^~IFjL�e
# length is 34
Can anybody help me understand the issue and how to get over?
thanks,
Subeen.
http://love-python.blogspot.com