[mod_python] Sessions and Cookies with mod_python and more

Graham Dumpleton grahamd at dscpl.com.au
Wed Nov 17 16:30:17 EST 2004


On Nov 17 10:27, Bram <bram-lists at phoenux.org> wrote:
>
> Subject: [mod_python] Sessions and Cookies with mod_python and more
> 2. Any ideas on how to write a mod_python XMLRPC handler that is capable 
> of sending/receiving multipart/related data. For those of you not 
> familiar with multi part messages, see this: 
> http://www.xml.com/lpt/a/98/07/binary/binary.html . multipart messages 
> were created for use with email systems, and have been used to send 
> binary payloads along with XML messages like XMLRPC. I have implemented 
> this type of handler in mod_perl, but I am looking for any mod_python 
> related insight into this before porting. Anyone?

Be careful about referring to this as XMLRPC as people will possibly think
you are talking about XML-RPC which is different. The original RPC over
HTTP protocol called "XML-RPC" has no support for multipart messages.

Information about XML-RPC can be found at:

  http://www.xmlrpc.com

Anyway, you might as a start, look at:

  mod_python.utils.FieldStorage

This is primarily intended for handing HTML forms, but if one is doing file
uploads one uses a form encoding type of "multipart/form-data" which starts
to be more like what you want as boundaries will be put in the posted data
allowing elements of different types to be include in the one POST request.
You may be able to fit what you are doing into this model and use that
class as a base or at least get ideas from it.

--
Graham Dumpleton (grahamd at dscpl.com.au)


More information about the Mod_python mailing list