W3C home > Mailing lists > Public > www-talk@w3.org > July to August 2000

RE: 404 Error "Standards"

From: David Trout <dtrout@sprintmail.com>
Date: Thu, 17 Aug 2000 07:48:02 -0400 (EDT)
Message-ID: <382634665.966512873900.JavaMail.root@web624-wrb.mail.com>
To: "Siegel, David" <David.Siegel@dialogic.com>, "'www-talk@w3.org'" <www-talk@w3.org>

See sections 9.4 ("HEAD request") and 6.1 ("Status-Line") thru 6.1.1
("Status Code and Reason Phrase") of RFC 2616.

Basically you would send:

HEAD /dir/doc.html HTTP/1.1<CRLF>
Host: www.whatever.com<CRLF>

and then examine just the status code of the response (the second
blank-delimited 'word' of the first line of the response):

HTTP/1.1 404 Not Found<CRLF>
blah, blah, blah...<CRLF>

Only the "404" is significant, since the reason phrase of the response (the
"Not found" string) varies widely from server to server.

You might also consider checking only the first digit for a "4" or a "5"
instead of "404" specifically, since there are other errors besides 'Not
Found' that indicates a given document in inaccessable. (The list of
possible response codes and what they mean are documented in section 10.)

Good luck!


------Original Message------
From: "Siegel, David" <David.Siegel@dialogic.com>
To: "'www-talk@w3.org'" <www-talk@w3.org>
Sent: August 14, 2000 2:16:41 PM GMT
Subject: 404 Error "Standards"

In the process of researching how to "ping" a URL to check its validity, a
quick solution of just checking for a string involving "HTTP 404 Error" and
variations of it presented itself as a quick solution.  Is there currently a
"default" standard for web servers for 404 errors?  Is there a specific HTTP
header or META tag I can look for in the page that gets returned when the
page does not exist on the server? (This would probably be more consistent -
if it exists)

Any advice here would be great!!!


David Siegel

Received on Thursday, 17 August 2000 12:11:17 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:33:02 UTC