[Zope] Text only pages

John Hile johnh@hilgraeve.com
Wed, 10 May 2000 08:29:34 -0400


This is a multi-part message in MIME format.

------=_NextPart_000_0006_01BFBA59.DF2C2090
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

We have a page on our site that is intended to return plain-text only -- no
html.
The page consists of a dtml method that calls a single External method
which, in turn, returns plain text read from a file.
The page is read by a small client that uses HTTP to access the site.
Since the file that the text comes from can be any file, it may, itself,
contain html code. We've found that, in certain cases,
if the plain text happens to include html tags, Zope will insert an empty
html header at the beginning of the page. It contains
only "<html><head></head>".
We've tried setting the content type in the RESPONSE header to "text/plain",
but it has no effect. Anyone know what's going
on and how we can suppress it?

------=_NextPart_000_0006_01BFBA59.DF2C2090
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2920.0" name=3DGENERATOR></HEAD>
<BODY>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D262361112-10052000>We =
have a page on=20
our site that is intended to return plain-text only -- no=20
html.</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D262361112-10052000>The =
page consists of=20
a dtml method that calls a single External method which, in turn, =
returns plain=20
text read from a file.</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D262361112-10052000>The =
page is read by=20
a small client that uses HTTP to access the site.</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D262361112-10052000>Since =
the file that=20
the text comes from can be any file, it may, itself, contain html code. =
We've=20
found that, in certain cases,</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D262361112-10052000>if the =
plain text=20
happens to include html tags, Zope will insert an empty html header at =
the=20
beginning of the page. It contains</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D262361112-10052000>only=20
"&lt;html&gt;&lt;head&gt;&lt;/head&gt;".&nbsp; </SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D262361112-10052000>We've =
tried setting=20
the content type in the RESPONSE header to "text/plain", but it has no =
effect.=20
Anyone know what's going </SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D262361112-10052000>on and =
how we can=20
suppress it?</SPAN></FONT></DIV></BODY></HTML>

------=_NextPart_000_0006_01BFBA59.DF2C2090--