FutureQuest, Inc. FutureQuest, Inc. FutureQuest, Inc.

FutureQuest, Inc.
Go Back   FutureQuest Community > FutureQuest Site Owners (All may read - Only Site Owners May Respond) > Server FAQ
User Name
Password  Lost PW

Reply
 
Thread Tools Search this Thread Display Modes
Old 07-12-1999, 05:24 PM   Postid: 38105
Stephen
Registered User

Forum Notability:
89 pts: Helpful Contributor
[Post Feedback]
 
Join Date: Feb 1999
Location: L.A.
Posts: 671
Apache Server Response Codes

I've tried to determine the answer to this one but different sources give conflicting answers. So I thought I better get it straight from the horse's mouth.

What is the nature of the following HTTP response codes?

502, 503, and 504

Which is the Bad Gateway, Service Unavailable (or Overloaded), and Gateway Timeout ?

According to my Web Client Programming book these match in the order indicated. However, in Lincoln Stein's works the Overloaded code is attributed to 502, and the Gateway Timeout to 503.

Although I know these are supposed to be universal HTTP codes, what correspondence does Apache actually use?

Thanks.

P.S. I'm rewriting my .htaccess file to handle separate ErrorDocuments.
Stephen is offline   Reply With Quote
Old 07-12-1999, 05:45 PM   Postid: 38106
Justin
Registered User
 
Justin's Avatar

Forum Notability:
0 pts:
[Post Feedback]
 
Join Date: Jan 1999
Location: Kissimmee, FL
Posts: 3,672
The best thing to do is to check out www.Apache.org and look for a definative list of HTTP response codes... I dug around and only found the standard 401, 403, 404, 500, etc., but I'm sure with a little digging you will find what you're looking for.

HTH

------------------
Justin Nelson
FutureQuest Support
Justin is offline   Reply With Quote
Old 07-12-1999, 06:08 PM   Postid: 38107
 Terra
CTO FutureQuest, Inc.
 
Terra's Avatar
 
Join Date: Jun 1998
Location: Z'ha'dum
Posts: 8,108
After looking through the Apache site, it is not apparent where to find this info...  The definitive source is from the actual Apache source code...

The following is from httpd.h:

Code Sample:
/* ----------------------- HTTP Status Codes  ------------------------- */

/* The size of the static array in http_protocol.c for storing
 * all of the potential response status-lines (a sparse table).
 * A future version should dynamically generate the table at startup.
 */
#define RESPONSE_CODES 55

#define HTTP_CONTINUE                      100
#define HTTP_SWITCHING_PROTOCOLS           101
#define HTTP_PROCESSING                    102
#define HTTP_OK                            200
#define HTTP_CREATED                       201
#define HTTP_ACCEPTED                      202
#define HTTP_NON_AUTHORITATIVE             203
#define HTTP_NO_CONTENT                    204
#define HTTP_RESET_CONTENT                 205
#define HTTP_PARTIAL_CONTENT               206
#define HTTP_MULTI_STATUS                  207
#define HTTP_MULTIPLE_CHOICES              300
#define HTTP_MOVED_PERMANENTLY             301
#define HTTP_MOVED_TEMPORARILY             302
#define HTTP_SEE_OTHER                     303
#define HTTP_NOT_MODIFIED                  304
#define HTTP_USE_PROXY                     305
#define HTTP_TEMPORARY_REDIRECT            307
#define HTTP_BAD_REQUEST                   400
#define HTTP_UNAUTHORIZED                  401
#define HTTP_PAYMENT_REQUIRED              402
#define HTTP_FORBIDDEN                     403
#define HTTP_NOT_FOUND                     404
#define HTTP_METHOD_NOT_ALLOWED            405
#define HTTP_NOT_ACCEPTABLE                406
#define HTTP_PROXY_AUTHENTICATION_REQUIRED 407
#define HTTP_REQUEST_TIME_OUT              408
#define HTTP_CONFLICT                      409
#define HTTP_GONE                          410
#define HTTP_LENGTH_REQUIRED               411
#define HTTP_PRECONDITION_FAILED           412
#define HTTP_REQUEST_ENTITY_TOO_LARGE      413
#define HTTP_REQUEST_URI_TOO_LARGE         414
#define HTTP_UNSUPPORTED_MEDIA_TYPE        415
#define HTTP_RANGE_NOT_SATISFIABLE         416
#define HTTP_EXPECTATION_FAILED            417
#define HTTP_UNPROCESSABLE_ENTITY          422
#define HTTP_LOCKED                        423
#define HTTP_FAILED_DEPENDENCY             424
#define HTTP_INTERNAL_SERVER_ERROR         500
#define HTTP_NOT_IMPLEMENTED               501
#define HTTP_BAD_GATEWAY                   502
#define HTTP_SERVICE_UNAVAILABLE           503
#define HTTP_GATEWAY_TIME_OUT              504
#define HTTP_VERSION_NOT_SUPPORTED         505
#define HTTP_VARIANT_ALSO_VARIES           506
#define HTTP_INSUFFICIENT_STORAGE          507
#define HTTP_NOT_EXTENDED                  510

--snip--

#define ap_is_HTTP_INFO(x)         (((x) >= 100)&amp;&amp;((x) < 200))
#define ap_is_HTTP_SUCCESS(x)      (((x) >= 200)&amp;&amp;((x) < 300))
#define ap_is_HTTP_REDIRECT(x)     (((x) >= 300)&amp;&amp;((x) < 400))
#define ap_is_HTTP_ERROR(x)        (((x) >= 400)&amp;&amp;((x) < 600))
#define ap_is_HTTP_CLIENT_ERROR(x) (((x) >= 400)&amp;&amp;((x) < 500))
#define ap_is_HTTP_SERVER_ERROR(x) (((x) >= 500)&amp;&amp;((x) < 600))



Hope this helps...

--
Terra
--Sometimes the best book, is the code itself--
FutureQuest
[This message has been edited by ccTech (edited 07-12-99)]
Terra is offline   Reply With Quote
Old 07-13-1999, 01:05 AM   Postid: 38108
Stephen
Registered User

Forum Notability:
89 pts: Helpful Contributor
[Post Feedback]
 
Join Date: Feb 1999
Location: L.A.
Posts: 671
Thanks guys,

Terra, I appreciate that segment of the Apache code. I'm stuck using Xitami locally so the info provided is a great help.

Cheers.
Stephen is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 visitors)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -4. The time now is 12:24 AM.


Running on vBulletin®
Copyright © 2000 - 2019, Jelsoft Enterprises Ltd.
Hosted & Administrated by FutureQuest, Inc.
Images & content copyright © 1998-2019 FutureQuest, Inc.
FutureQuest, Inc.