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>
David,

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>
<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>
etc...<CRLF>
<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!

Fish

------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!!!

Thanks,

David Siegel
mailto:david.siegel@dialogic.com


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

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 27 October 2010 18:14:24 GMT