Looks better now. I suggest filing a collector issue and attaching the
patch. Somebody knowledgeable can then look at it.
Simon Hang wrote:
Philipp,
Sorry for being lazy, and thanks for the tips. Here is my update version.
--- httptask.py.origFri Jan 06 02:15:48 2006
+++ httptask.py Fri
Simon Hang wrote:
How about below changes?
There aren't many of us who know the zope.server code that well,
unfortunately. This is one of the reasons we want to get out of the
server business.
That said, it would *much* easier to understand what you're trying to do
if you provided
Thanks Philipp, here is the unified diffs.
--- httptask.py.orig Fri Jan 06 02:15:48 2006+++ httptask.py Thu Sep 21 17:31:17 2006@@ -126,6 +126,15 @@ else: close_it = 1 elif version == '1.1':+ #modified by Simon
+ thisflag = False+ for each in self.accumulated_headers:+ if each.lower() ==
Hi Simon,
I have a few comments regarding style. First::
if thisflag == False:
...
is unnecessarily long. Just write::
if not thisflag:
...
Also, what is thisflag? It'd be better to give it a descriptive name.
--- httptask.py.origFri Jan 06 02:15:48 2006
+++ httptask.py
Philipp,
Sorry for being lazy, and thanks for the tips. Here is my update version.
--- httptask.py.orig Fri Jan 06 02:15:48 2006+++ httptask.py Fri Sep 22 09:13:48 2006@@ -126,6 +126,11 @@ else: close_it = 1 elif version == '1.1':+ #modified by Simon
+ if 'connection: close' in (header.lower() for
How about below changes?
in httptask.py
def prepareResponseHeaders(self): version = self.version # Figure out whether the connection should be closed. connection = self.request_data.headers.get('CONNECTION', '').lower()
close_it = 0 response_headers = self.response_headers
if version ==