Raaijmakers, Vincent (GE Infrastructure)
Vincent.Raaijmakers at ge.com
Wed Apr 7 10:17:15 EST 2004
Looking for the recipe of multipart data stream please give me the answer to this question: If I sniff on my network to see what actual bytes are being send to the client after a seq.write("hello world") from my very simple application, I see: 62 0a 0d 68 65 6c 6c 6f 20 77 6f 72 6c 64 0a 0d So, the part that I would like to know is why I see the *62* 0a 0d on front of my byte array in every seq.write()? I underdstand that data length is required, but for every write? Is that a w3 convention? I can't find this in the documentation on the web. Tried to Google as well, perhaps missed the correct key words. If you don't want to see that 'length lfcr' in your byte array, what is it what you need to do? Reason I would like to see this is to keep a session open and keep on streaming to the client. So, repeat the write until done. Apologize if this is a too newbie in web land question... Vincent -----Original Message----- From: mod_python-bounces at modpython.org [mailto:mod_python-bounces at modpython.org]On Behalf Of Colin Fox Sent: Tuesday, April 06, 2004 12:45 PM To: mod_python at modpython.org Subject: [mod_python] Sessions blocking... -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I've still got the problem where using sessions causes my pages to hang. Now that I've got "ask before storing" for cookies, I can see that the pages that are hanging are hanging before trying to write the pysid cookie - and that is one of the first things done for my pages. I'm using sessions to track logins, and on each page I want to print either "not logged in" or "logged in as:xxx". So for each page, I do: session = session.Session(req) if session.has_key('username'): ~ req.write('logged in as %s' % session['username']) else: ~ req.write('not logged in') This seems to work fine, apart from when the session hangs, which is about 1 in 5 page loads. I can't really predict when it will happen, but ~ it is about that often. cf -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) iD8DBQFAct6boaQ1/feGlJoRAuBXAKCXOIjfPvLgJJSbBudVs78SMLBscgCeN6+k 642LkiB5O8ZepYfTiJnLuNk= =poBi -----END PGP SIGNATURE----- _______________________________________________ Mod_python mailing list Mod_python at modpython.org http://mailman.modpython.org/mailman/listinfo/mod_python
|