[Zope] - content-length problem with netscape

Carsten Oberscheid co@daisybytes.su.uunet.de
Sat, 2 Jan 1999 18:23:50 +0100


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi all,

we're using Bobo-2.1.2 with Document Template 2.1 for an online publishing 
application (german legal text -- announcement for public beta will follow 
soon), and we run into an interesting

PROBLEM:
When downloading HTML documents generated by Bobo using document templates, 
Netscape Navigator sometimes/often misses the end of the document. Seems like 
it doesn't wait for the end of the transmission. If this happens within a html 
tag, the document displayed ends with the beginning of this tag.
The frequency of this error appears to depend on the length of the individual 
document and, even more, on the transmission speed (on a 100MBit LAN it's very 
rare, on a 64KBit ISDN line it happens _very_ often). We observed it ONLY with 
Netscape 3.x and 4.x on WinNT and on Linux. MS Internet Explorer and Netscape 
2.01 didn't show the problem so far (neither did lynx :-).

Now it seems we found a

SOLUTION:
In CGIResponse.py, class Response, method __str__, the content-length header is 
set to len(body). After removing this line of code, the problem seems to be 
gone without visible impact on functionality.

This leaves us with some

QUESTIONS:

1)   Can anybody confirm this error? Any experiences with other browsers than 
Netscape?
2)   Is our fix safe? Will it work with other content types than text/html? Bet 
it won't... :(
3)   If this is _not_ a Bobo/DT bug, what could we be doing wrong?
4)   [optional] Does this mean that Netscape gets a wrong (too short) content 
length and reacts correctly,
      while MSIE just ignores this header and listens until </HTML>, or is the 
content length correct and
      Netscape is buggy, or what?

Any ANSWERS out there?

Best regards,

.co.

PS: I hope my CC to [Zope] is netically correct. If not, please tell me and 
I'll never do it again, I promise, mommy.

+------------------------------------------------------- daisy bytes! --------+
 Carsten Oberscheid
 co@daisybytes.su.uunet.de                        digital document processing
 http://www.pweb.de/daisybytes.su                     electronic publishing

-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 5.5.3i for non-commercial use <http://www.pgpi.com>

iQA/AwUBNo5IF4wjR4jmR8/DEQKaVACg26va5hDJ36EoOs9Pq9mu8GF8VIEAoPCy
OGIM0sNPZ7LHyIevDOkX/PYk
=qkVE
-----END PGP SIGNATURE-----