Apache2
Collaboration diagram for HTTP Status Codes:

Macros

#define RESPONSE_CODES   103
 
#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_ALREADY_REPORTED   208
 
#define HTTP_IM_USED   226
 
#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_PERMANENT_REDIRECT   308
 
#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_IM_A_TEAPOT   418
 
#define HTTP_MISDIRECTED_REQUEST   421
 
#define HTTP_UNPROCESSABLE_ENTITY   422
 
#define HTTP_LOCKED   423
 
#define HTTP_FAILED_DEPENDENCY   424
 
#define HTTP_TOO_EARLY   425
 
#define HTTP_UPGRADE_REQUIRED   426
 
#define HTTP_PRECONDITION_REQUIRED   428
 
#define HTTP_TOO_MANY_REQUESTS   429
 
#define HTTP_REQUEST_HEADER_FIELDS_TOO_LARGE   431
 
#define HTTP_UNAVAILABLE_FOR_LEGAL_REASONS   451
 
#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_LOOP_DETECTED   508
 
#define HTTP_NOT_EXTENDED   510
 
#define HTTP_NETWORK_AUTHENTICATION_REQUIRED   511
 
#define ap_is_HTTP_INFO(x)   (((x) >= 100)&&((x) < 200))
 
#define ap_is_HTTP_SUCCESS(x)   (((x) >= 200)&&((x) < 300))
 
#define ap_is_HTTP_REDIRECT(x)   (((x) >= 300)&&((x) < 400))
 
#define ap_is_HTTP_ERROR(x)   (((x) >= 400)&&((x) < 600))
 
#define ap_is_HTTP_CLIENT_ERROR(x)   (((x) >= 400)&&((x) < 500))
 
#define ap_is_HTTP_SERVER_ERROR(x)   (((x) >= 500)&&((x) < 600))
 
#define ap_is_HTTP_VALID_RESPONSE(x)   (((x) >= 100)&&((x) < 600))
 
#define ap_status_drops_connection(x)
 
#define AP_STATUS_IS_HEADER_ONLY(x)
 

Detailed Description

Macro Definition Documentation

◆ ap_is_HTTP_CLIENT_ERROR

#define ap_is_HTTP_CLIENT_ERROR (   x)    (((x) >= 400)&&((x) < 500))

is the status code a client error

◆ ap_is_HTTP_ERROR

#define ap_is_HTTP_ERROR (   x)    (((x) >= 400)&&((x) < 600))

is the status code a error (client or server)

◆ ap_is_HTTP_INFO

#define ap_is_HTTP_INFO (   x)    (((x) >= 100)&&((x) < 200))

is the status code informational

◆ ap_is_HTTP_REDIRECT

#define ap_is_HTTP_REDIRECT (   x)    (((x) >= 300)&&((x) < 400))

is the status code a redirect

◆ ap_is_HTTP_SERVER_ERROR

#define ap_is_HTTP_SERVER_ERROR (   x)    (((x) >= 500)&&((x) < 600))

is the status code a server error

◆ ap_is_HTTP_SUCCESS

#define ap_is_HTTP_SUCCESS (   x)    (((x) >= 200)&&((x) < 300))

is the status code OK ?

◆ ap_is_HTTP_VALID_RESPONSE

#define ap_is_HTTP_VALID_RESPONSE (   x)    (((x) >= 100)&&((x) < 600))

is the status code a (potentially) valid response code?

◆ ap_status_drops_connection

#define ap_status_drops_connection (   x)
Value:
(((x) == HTTP_BAD_REQUEST) || \
((x) == HTTP_REQUEST_TIME_OUT) || \
((x) == HTTP_LENGTH_REQUIRED) || \
#define HTTP_BAD_REQUEST
Definition: httpd.h:513
#define HTTP_SERVICE_UNAVAILABLE
Definition: httpd.h:545
#define HTTP_LENGTH_REQUIRED
Definition: httpd.h:524
#define HTTP_REQUEST_TIME_OUT
Definition: httpd.h:521
#define HTTP_REQUEST_URI_TOO_LARGE
Definition: httpd.h:527
#define HTTP_INTERNAL_SERVER_ERROR
Definition: httpd.h:542
#define HTTP_REQUEST_ENTITY_TOO_LARGE
Definition: httpd.h:526
#define HTTP_NOT_IMPLEMENTED
Definition: httpd.h:543

should the status code drop the connection

◆ AP_STATUS_IS_HEADER_ONLY

#define AP_STATUS_IS_HEADER_ONLY (   x)
Value:
((x) == HTTP_NO_CONTENT || \
#define HTTP_NOT_MODIFIED
Definition: httpd.h:509
#define HTTP_NO_CONTENT
Definition: httpd.h:499

does the status imply header only response (i.e. never w/ a body)?

◆ HTTP_ACCEPTED

#define HTTP_ACCEPTED   202

◆ HTTP_ALREADY_REPORTED

#define HTTP_ALREADY_REPORTED   208

◆ HTTP_BAD_GATEWAY

#define HTTP_BAD_GATEWAY   502

◆ HTTP_BAD_REQUEST

#define HTTP_BAD_REQUEST   400

◆ HTTP_CONFLICT

#define HTTP_CONFLICT   409

◆ HTTP_CONTINUE

#define HTTP_CONTINUE   100

◆ HTTP_CREATED

#define HTTP_CREATED   201

◆ HTTP_EXPECTATION_FAILED

#define HTTP_EXPECTATION_FAILED   417

◆ HTTP_FAILED_DEPENDENCY

#define HTTP_FAILED_DEPENDENCY   424

◆ HTTP_FORBIDDEN

#define HTTP_FORBIDDEN   403

◆ HTTP_GATEWAY_TIME_OUT

#define HTTP_GATEWAY_TIME_OUT   504

◆ HTTP_GONE

#define HTTP_GONE   410

◆ HTTP_IM_A_TEAPOT

#define HTTP_IM_A_TEAPOT   418

◆ HTTP_IM_USED

#define HTTP_IM_USED   226

◆ HTTP_INSUFFICIENT_STORAGE

#define HTTP_INSUFFICIENT_STORAGE   507

◆ HTTP_INTERNAL_SERVER_ERROR

#define HTTP_INTERNAL_SERVER_ERROR   500

◆ HTTP_LENGTH_REQUIRED

#define HTTP_LENGTH_REQUIRED   411

◆ HTTP_LOCKED

#define HTTP_LOCKED   423

◆ HTTP_LOOP_DETECTED

#define HTTP_LOOP_DETECTED   508

◆ HTTP_METHOD_NOT_ALLOWED

#define HTTP_METHOD_NOT_ALLOWED   405

◆ HTTP_MISDIRECTED_REQUEST

#define HTTP_MISDIRECTED_REQUEST   421

◆ HTTP_MOVED_PERMANENTLY

#define HTTP_MOVED_PERMANENTLY   301

◆ HTTP_MOVED_TEMPORARILY

#define HTTP_MOVED_TEMPORARILY   302

◆ HTTP_MULTI_STATUS

#define HTTP_MULTI_STATUS   207

◆ HTTP_MULTIPLE_CHOICES

#define HTTP_MULTIPLE_CHOICES   300

◆ HTTP_NETWORK_AUTHENTICATION_REQUIRED

#define HTTP_NETWORK_AUTHENTICATION_REQUIRED   511

◆ HTTP_NO_CONTENT

#define HTTP_NO_CONTENT   204

◆ HTTP_NON_AUTHORITATIVE

#define HTTP_NON_AUTHORITATIVE   203

◆ HTTP_NOT_ACCEPTABLE

#define HTTP_NOT_ACCEPTABLE   406

◆ HTTP_NOT_EXTENDED

#define HTTP_NOT_EXTENDED   510

◆ HTTP_NOT_FOUND

#define HTTP_NOT_FOUND   404

◆ HTTP_NOT_IMPLEMENTED

#define HTTP_NOT_IMPLEMENTED   501

◆ HTTP_NOT_MODIFIED

#define HTTP_NOT_MODIFIED   304

◆ HTTP_OK

#define HTTP_OK   200

◆ HTTP_PARTIAL_CONTENT

#define HTTP_PARTIAL_CONTENT   206

◆ HTTP_PAYMENT_REQUIRED

#define HTTP_PAYMENT_REQUIRED   402

◆ HTTP_PERMANENT_REDIRECT

#define HTTP_PERMANENT_REDIRECT   308

◆ HTTP_PRECONDITION_FAILED

#define HTTP_PRECONDITION_FAILED   412

◆ HTTP_PRECONDITION_REQUIRED

#define HTTP_PRECONDITION_REQUIRED   428

◆ HTTP_PROCESSING

#define HTTP_PROCESSING   102

◆ HTTP_PROXY_AUTHENTICATION_REQUIRED

#define HTTP_PROXY_AUTHENTICATION_REQUIRED   407

◆ HTTP_RANGE_NOT_SATISFIABLE

#define HTTP_RANGE_NOT_SATISFIABLE   416

◆ HTTP_REQUEST_ENTITY_TOO_LARGE

#define HTTP_REQUEST_ENTITY_TOO_LARGE   413

◆ HTTP_REQUEST_HEADER_FIELDS_TOO_LARGE

#define HTTP_REQUEST_HEADER_FIELDS_TOO_LARGE   431

◆ HTTP_REQUEST_TIME_OUT

#define HTTP_REQUEST_TIME_OUT   408

◆ HTTP_REQUEST_URI_TOO_LARGE

#define HTTP_REQUEST_URI_TOO_LARGE   414

◆ HTTP_RESET_CONTENT

#define HTTP_RESET_CONTENT   205

◆ HTTP_SEE_OTHER

#define HTTP_SEE_OTHER   303

◆ HTTP_SERVICE_UNAVAILABLE

#define HTTP_SERVICE_UNAVAILABLE   503

◆ HTTP_SWITCHING_PROTOCOLS

#define HTTP_SWITCHING_PROTOCOLS   101

◆ HTTP_TEMPORARY_REDIRECT

#define HTTP_TEMPORARY_REDIRECT   307

◆ HTTP_TOO_EARLY

#define HTTP_TOO_EARLY   425

◆ HTTP_TOO_MANY_REQUESTS

#define HTTP_TOO_MANY_REQUESTS   429

◆ HTTP_UNAUTHORIZED

#define HTTP_UNAUTHORIZED   401

◆ HTTP_UNAVAILABLE_FOR_LEGAL_REASONS

#define HTTP_UNAVAILABLE_FOR_LEGAL_REASONS   451

◆ HTTP_UNPROCESSABLE_ENTITY

#define HTTP_UNPROCESSABLE_ENTITY   422

◆ HTTP_UNSUPPORTED_MEDIA_TYPE

#define HTTP_UNSUPPORTED_MEDIA_TYPE   415

◆ HTTP_UPGRADE_REQUIRED

#define HTTP_UPGRADE_REQUIRED   426

◆ HTTP_USE_PROXY

#define HTTP_USE_PROXY   305

◆ HTTP_VARIANT_ALSO_VARIES

#define HTTP_VARIANT_ALSO_VARIES   506

◆ HTTP_VERSION_NOT_SUPPORTED

#define HTTP_VERSION_NOT_SUPPORTED   505

◆ RESPONSE_CODES

#define RESPONSE_CODES   103

The size of the static status_lines array in http_protocol.c for storing all of the potential response status-lines (a sparse table). When adding a new code here add it to status_lines as well. A future version should dynamically generate the apr_table_t at startup.