> Q: How can a <cfexit> tag running on the server affect how
> a browser renders a certain source file that's given to it?
>
> The only thing I can think of is some *really* obscure part
> of the HTTP header that's affected by the <cfexit> tag.
> This would explain why the page displays OK if you save the
> source out as static HTML and load that.
>
> As I said, I can turn this problem "on and off" in a reliable
> fashion by using or removing the <cfexit> tag, so I know how
> to solve the problem. I'm just too baffled to leave it be!
> (Maybe sign of an immature coder - not fully learnt to leave
> bugs behind if you can find the *solution* but not the
> *explanation*! ;)
A: You wouldn't think this could happen, but I can imagine it. The CF server
outputs HTTP response headers that look like this:
HTTP/1.1 200 OK
Server: Microsoft-IIS/4.0
Date: Sat, 09 Feb 2002 01:02:55 GMT
Content-type: text/html
Page-Completion-Status: Normal
Page-Completion-Status:
Nor
mal
Note the way the "Page-Completion-Status" header is both indented and
repeated. If I'm correct about its behavior, it gets output once for each
script used to generate the output; in the above example, Application.cfm
and index.cfm are both running.
Now, here's the weird part: I've seen this cause output errors in browsers
occasionally - typically, if traffic goes through a proxy server which may
rewrite HTTP headers. I don't really know the exact cause, but those headers
don't look kosher to me, really.
So, here's what you can do to diagnose the problem. As long as you're not
using conditional logic within the page to generate different versions of
HTML output based on browser type, simply open your telnet client and
connect to your web server. Then, type in something like this:
GET /myfile.cfm HTTP/1.0 (where myfile.cfm would be replaced by the fully
qualified path and file from the web root)
Then, hit return twice, and the web server will return the HTTP response
header, followed by the actual HTML page. Try this with and without the
CFEXIT tag, and see if anything's different in the HTTP response header. If
you are using conditional logic within your page to generate
browser-specific HTML, you can still do this, but it'll be a little more
work, and you might be better served by using a recording proxy, such as
Stretch (http://www.kestral.com.au/) to record HTTP response headers.
Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444
______________________________________________________________________
Get Your Own Dedicated Windows 2000 Server
PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
Instant Activation � $99/Month � Free Setup
http://www.pennyhost.com/redirect.cfm?adcode=coldfusionb
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists