On Fri, Dec 15, 2000 at 08:48:18AM +0100, Jerome Alet wrote:
On Thu, 14 Dec 2000, Evan Simpson wrote:
From: seb bacon <seb@jamkit.com>
I imagine the fact that I can make it work by adding index_html is the most telling point, but it's not telling me anything ;)
Leaving off index_html causes Zope to add a <base href> to the head. That's
WHOW !
<base href> is exactly 11 bytes long. Couldn't it be that the content-length is computed by Zope before you automatically add this tag ?
This indeed *seems* to be the problem with this server, the content-length is 14 bytes (not 11) too short. This isn't a general Zope bug however, only a bug with this particular server. Zope adds \n<base href="http://test.jamkit.com/">\n, which is 39 bytes extra (including newlines): sneek:~> telnet test.jamkit.com 80 Trying 213.210.4.254... Connected to 213.210.4.254. Escape character is '^]'. GET / HTTP/1.0 Host: test.jamkit.com HTTP/1.0 200 OK Server: Zope/Zope 2.2.2 (source release, python 1.5.2, linux2) ZServer/1.1b1 Date: Fri, 15 Dec 2000 09:53:15 GMT Content-Type: text/html Content-Length: 4226 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <html><head></head> <head> <base href="http://test.jamkit.com/"> <title>WebFactory</title> [<SNIP rest of content>] Note the content lenght of 4226. Now compare with /index_html: sneek:~> telnet test.jamkit.com 80 Trying 213.210.4.254... Connected to 213.210.4.254. Escape character is '^]'. GET /index_html HTTP/1.0 Host: test.jamkit.com HTTP/1.0 200 OK Server: Zope/Zope 2.2.2 (source release, python 1.5.2, linux2) ZServer/1.1b1 Date: Fri, 15 Dec 2000 09:53:50 GMT Content-Type: text/html Content-Length: 4201 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <html><head></head> <head><title>WebFactory</title> <meta content="text/html; charset=iso-8859-1" http-equiv=content-type> [<SNIP rest of content>] Note again the content length, 4201. Now, 4226 - 4201 = 25. It seems we lost 14 bytes of content! However, I cannot reproduce this on my 2.2.4 server, or a Zope 2.2.2 source install, or on www.zope.org. All produce the correct number of bytes sent! Even better, if you don't send the host header to the test.jamkit.com server, you get www.cemcrem.com, which sends the correct lengths as well! All this points to something wrong with the particular server itself. Either there is a proxy in between that recalculates the content length (and forgets about \r\n conbos or some such thing), or you modified the Zope source somewhere, or you are doing something else funny. -- Martijn Pieters | Software Engineer mailto:mj@digicool.com | Digital Creations http://www.digicool.com/ | Creators of Zope http://www.zope.org/ ---------------------------------------------