Ahh.  Thanks.  Is there a way to validate that the header indeed contains a
404?

-----Original Message-----
From: Jochem van Dieten [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 23, 2005 1:19 PM
To: CF-Talk
Subject: Re: CHEADER and forcing a 404


Shawn McKee wrote:
> Based on what happens during the processing of a page I may need to hand a
404 error back to the user.  When I create a page that has nothing but this
on it:
> 
> <cfheader statuscode="404" statustext="Not Found">
> <cfabort>
> 
> I get a blank page, not a 404.  More specifically I get an open html, open
body, close html and close body tags.
> 
> What's wrong?

You are not sending an error page. Just because you are sending a 
404 statuscode doesn't mean you shouldn't send any HTML :)

<cfheader statuscode="404" statustext="Not Found">
<html>
<head><title>not found</title></head>
<body><h1>Not found</h1></body>
</html>
<cfabort>

Jochem



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:210410
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to