Is there any reason to expose the encoded binary to the application at all? Why not just have the xmlrpc module decode the incoming data and just pass it along in a string or StringIO object automatically? Perhaps the latter would be better so that the decode could wait until read was actually called, thereby saving server cpu cycles if the binary is never read for some reason (like a validation error or other exception). -Casey On Tuesday 10 September 2002 12:43 pm, Kyler Laird wrote:
On Tue, Sep 10, 2002 at 10:53:18AM -0400, Casey Duncan wrote:
This would appear to be a bug.
I'll let Chris do that, but here's my recommendation...
The root of the problem is the Binary class. It might work just fine for its intended purpose, but it needs to be rewritten if anyone else is going to use it. It also needs to be accessible to restricted code.
Everything could be solved if Binary were made to store its data unencoded/decoded and present it either encoded or decoded. Ideally, it could also provide whatever methods (seek and read?) are required for manage_addFile/ manage_addImage to accept it as source data ("file").
--kyler