[Zope] XML-RPC and binary data
   
    Casey Duncan
     
    casey@zope.com
       
    Tue, 10 Sep 2002 12:57:53 -0400
    
    
  
Is there any reason to expose the encoded binary to the application at al=
l?=20
Why not just have the xmlrpc module decode the incoming data and just pas=
s it=20
along in a string or StringIO object automatically?
Perhaps the latter would be better so that the decode could wait until re=
ad=20
was actually called, thereby saving server cpu cycles if the binary is ne=
ver=20
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:
>=20
> > This would appear to be a bug.
>=20
> I'll let Chris do that, but here's my recommendation...
>=20
> 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.
>=20
> 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").
>=20
> --kyler
>=20
>=20