我的client端為Android平台撰寫語言為Java
在Java端將byte array ( byte[] ) 編碼成base64字串
送至Python 的 Server端接收到base64字串
但是要將此字串解碼為python的byte array遇到了一些問題
des_encoded = request.args["des_encoded"]
data = base64.b64decode(des_encoded)
錯誤訊息:
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/twisted/web/http.py", line
1439, in dataReceived
finishCallback(data[contentLength:])
File "/usr/local/lib/python2.7/dist-packages/twisted/web/http.py", line
1708, in _finishRequestBody
self.allContentReceived()
File "/usr/local/lib/python2.7/dist-packages/twisted/web/http.py", line
1781, in allContentReceived
req.requestReceived(command, path, version)
File "/usr/local/lib/python2.7/dist-packages/twisted/web/http.py", line
768, in requestReceived
self.process()