[Zope] Re: Stop zope from adding <html><head></head> to my method
Tom Neff
tneff@bigfoot.com
Fri, 25 Feb 2000 17:42:44 -0500
#1, it is absolutely NOT the browser that adds HTML and HEAD tags to the
output from DTML methods. It is some default behavior in the ZPublisher.
Verifying stuff like this takes about 20 seconds using Lynx and/or Telnet,
even if you don't grok Zope internals. I strongly urge David and others not
to post untested guesses as answers to specific technical questions here -
it has the potential to confuse hundreds of readers.
#2, there is a much simpler way to override Content-Type and other HTTP
headers in any DTML Method: simply put them as the first lines in your
method body, separated from the rest of the body content by a blank line.
Try it: create a DTML Method called 'tom_is_great' and edit this in:
+-----------------------
|Content-Type: text/xml
|X-Tom-Status: right as rain
|
|<document title="Tom is right">
|<status>Amazing...</status>
|</document>
|
+-----------------------
[Change]
Now go look at it in IEXPLORE or dump it with Lynx, and voila. Modesty in
three colors. :)