By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,548 Members | 1,496 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,548 IT Pros & Developers. It's quick & easy.

Looking for cookbook/recipe generating multipart web data

P: n/a
My web server (apache+mod_python) needs to reply on some session with a multipart connection.
My idea is to use the content-type of multipart/mixed; boundary=--myboundary

The data that I would like to send is a continuous stream of data, divided by that boundary.
Well, there are tons of examples on the web how to encode such a stream on the client side, but I can't find an example how to generate this data using mod_python.

So for now in the very simple example, my code looks like:

req.content_type("multipart/mixed; boundary=--myboundary")
while forever:
data = "--myboudary\r\n%s" % getData()

However, for every req.write, len(data) + lfcr + boundary/data + lfcr is send out and I just want to send boudary/data like I see in existing applications on the web and described in the w3 norms of multipart.

What is the correct way of doing this? Where can I find the proper cookbook?


Jul 18 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.