[Zope-dev] ZServer HTTP 1.0 persistent conections (was [Zope] Netscape/Zope cache problem) problem)

Itamar Shtull-Trauring itamars@ibm.net
Mon, 29 Nov 1999 21:33:01 +0200


I moved this to zope-dev.

Sam Gendler wrote:

> I just did a little test, and couldn't help but notice that Zope claims to
> support HTTP/1.1, in that it will respond to a 1.1 request with a 1.1
> response.  It even did a persistent connection.  However, when I sent a 1.0
> request at it, including a Connection: keep-alive header, it still failed
> to do a persistent connection.

This code from ZServer/medua/http_client.py seems to imply that it should be
persistent (only there's a bug somewhere preventing it):

connection = string.lower (get_header (CONNECTION, self.header))

close_it = 0
wrap_in_chunking = 0

if self.version == '1.0':
	if connection == 'keep-alive':
		if not self.has_key ('Content-Length'):
			close_it = 1
		else:
			self['Connection'] = 'Keep-Alive'
	else:
		close_it = 1

-- 
Itamar S.T.  itamars@ibm.net