Jay
jayed at meangrape.com
Mon Apr 10 08:58:25 EDT 2006
On Mon, Apr 10, 2006 at 08:01:43PM +1000, Graham Dumpleton wrote: > I don't quite understand why req.set_content_length() wouldn't work as > long as it is called before the first call of filter.write(). After > all, the > CONTENT_LENGTH filter works by doing the same thing. Actually, having tried it now, it seems to work. > I would > highly recommend though that you upgrade to mod_python 3.2.8 > if you are still using 3.1.2 as mentioned in your README. It's on the list to do this week. > Please let us know what you work out. I can return the length and the data in both cases and it works fine. if not equations: length = len(data) return length, data if equations: [...munge the parse-tree-object into a string...] length = len(parse-tree-object-string) return length, parse-tree-object-string I can not return the length in both cases and not use the CONTENT_LENGTH filter, and it works fine. if not equations: return data if equations: return munged-data If I try to use the CONTENT_LENGTH filter and set the length manually, it doesn't work. if not equations: return length, data if equations: return munged-data (<--- no length) At this point, I no longer have the slightest clue what the code that had the original problem looked like, and I'm too tired to dig around in subversion to find it. Right now the problem looks to be fixed; I'll keep poking at it to see how I can make it break if I find the time. Thanks for all your help. -- Jay.
|