aboutsummaryrefslogtreecommitdiff
path: root/src/http/ngx_http_request.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/http/ngx_http_request.h')
-rw-r--r--src/http/ngx_http_request.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/http/ngx_http_request.h b/src/http/ngx_http_request.h
index 716818fa4..8013ef840 100644
--- 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,