473,237 Members | 1,162 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,237 software developers and data experts.

Looking for cookbook/recipe generating multipart web data

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
0 1140

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: Ringwraith | last post by:
Hello! I want to ask You the question about the licence of ASPN online Python Cookbook recipes. Under what licence are those recipes. If I want to use in my application some parts of the code...
by: Steven | last post by:
Hello, I'm seeking a read method that will block until new data is available. Is there such a python function that does that? Thanks, Steven Howe
by: magoldfish | last post by:
Hi, I've installed Python 2.4 on Windows XP and walked through the Alex Martelli ASPN cookbook example at: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/66509 This is a recipe for...
by: Will McGugan | last post by:
Hi, Is the second edition of the Python Cookbook worth getting if you have the first edition? How much new material is there in the 2nd edition? Thanks, Will McGugan
by: TechBookReport | last post by:
TechBookReport (http://www.techbookreport.com) has just published a review of the Python Cookbook. This is an extract from the full review: We're big fans of cookbooks here at TechBookReport,...
by: Frederick Noronha \(FN\) | last post by:
---------- Forwarded message ---------- Solutions to Everyday User Interface and Programming Problems O'Reilly Releases "Access Cookbook, Second Edition" Sebastopol, CA--Neither reference book...
by: Steve Howell | last post by:
George Sakkis produced the following cookbook recipe, which addresses a common problem that comes up on this mailing list: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/521877 I...
by: Alex Popescu | last post by:
Hi all! I was reading through Python Cookbook the Singleton recipe. At this moment I am a bit puzzled as the example in the book is not working resulting in: TypeError:...
by: Nick Craig-Wood | last post by:
Trent Mick <trentm@activestate.comwrote: Looks great and much faster than the old site! Mind telling us how it is implemented? I'm guessing python/django by the url and the fact that you have...
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.