Mercurial > hg > nginx
diff src/http/ngx_http_request.h @ 335:d4241d7787fe
nginx-0.0.3-2004-05-14-20:51:47 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Fri, 14 May 2004 16:51:47 +0000 |
parents | 39b6f2df45c0 |
children | 6bdf858bff8c |
line wrap: on
line diff
--- a/src/http/ngx_http_request.h +++ b/src/http/ngx_http_request.h @@ -31,6 +31,7 @@ #define NGX_HTTP_PARSE_NO_HOST_HEADER 16 #define NGX_HTTP_PARSE_INVALID_CL_HEADER 17 #define NGX_HTTP_PARSE_POST_WO_CL_HEADER 18 +#define NGX_HTTP_PARSE_INVALID_HOST 19 #define NGX_HTTP_OK 200 @@ -50,6 +51,17 @@ #define NGX_HTTP_REQUEST_URI_TOO_LARGE 414 #define NGX_HTTP_RANGE_NOT_SATISFIABLE 416 + +/* Our own HTTP codes */ + +#define NGX_HTTP_NGX_CODES NGX_HTTP_INVALID_HOST + +/* + * We use the special code for the requests with invalid host name + * to distinguish it from 4XX in an error page redirection + */ +#define NGX_HTTP_INVALID_HOST 498 + /* * HTTP does not define the code for the case when a client closed * the connection while we are processing its request so we introduce @@ -58,6 +70,7 @@ */ #define NGX_HTTP_CLIENT_CLOSED_REQUEST 499 + #define NGX_HTTP_INTERNAL_SERVER_ERROR 500 #define NGX_HTTP_NOT_IMPLEMENTED 501 #define NGX_HTTP_BAD_GATEWAY 502 @@ -66,6 +79,13 @@ typedef enum { + NGX_HTTP_RESTRICT_HOST_OFF = 0, + NGX_HTTP_RESTRICT_HOST_ON, + NGX_HTTP_RESTRICT_HOST_CLOSE +} ngx_http_restrict_host_e; + + +typedef enum { NGX_HTTP_INITING_REQUEST_STATE = 0, NGX_HTTP_READING_REQUEST_STATE, NGX_HTTP_PROCESS_REQUEST_STATE,