[Zope3-Users] Re: Is this a bug of HTTP response's head handling? (publisherhttpserver.py)

2006-09-22 Thread Philipp von Weitershausen
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

[Zope3-Users] Re: Is this a bug of HTTP response's head handling? (publisherhttpserver.py)

2006-09-21 Thread Philipp von Weitershausen
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

Re: [Zope3-Users] Re: Is this a bug of HTTP response's head handling? (publisherhttpserver.py)

2006-09-21 Thread Simon Hang
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() ==

Re: [Zope3-Users] Re: Is this a bug of HTTP response's head handling? (publisherhttpserver.py)

2006-09-21 Thread Philipp von Weitershausen
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

Re: [Zope3-Users] Re: Is this a bug of HTTP response's head handling? (publisherhttpserver.py)

2006-09-21 Thread Simon Hang
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

[Zope3-Users] Re: Is this a bug of HTTP response's head handling? (publisherhttpserver.py)

2006-09-20 Thread Simon Hang
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 ==