diff src/stream/ngx_stream.h @ 6674:38143d1abdec

Stream: the $status variable. The stream session status is one of the following: 200 - normal completion 403 - access forbidden 500 - internal server error 502 - bad gateway 503 - limit conn
author Roman Arutyunyan <arut@nginx.com>
date Thu, 11 Aug 2016 20:22:23 +0300
parents 164a0824ce20
children ab9b4fd8c5b7
line wrap: on
line diff
--- a/src/stream/ngx_stream.h
+++ b/src/stream/ngx_stream.h
@@ -26,6 +26,13 @@ typedef struct ngx_stream_session_s  ngx
 #include <ngx_stream_upstream_round_robin.h>
 
 
+#define NGX_STREAM_OK                        200
+#define NGX_STREAM_FORBIDDEN                 403
+#define NGX_STREAM_INTERNAL_SERVER_ERROR     500
+#define NGX_STREAM_BAD_GATEWAY               502
+#define NGX_STREAM_SERVICE_UNAVAILABLE       503
+
+
 typedef struct {
     void                         **main_conf;
     void                         **srv_conf;
@@ -173,6 +180,8 @@ struct ngx_stream_session_s {
     int                           *captures;
     u_char                        *captures_data;
 #endif
+
+    ngx_uint_t                     status;
 };
 
 
@@ -223,7 +232,7 @@ typedef struct {
 
 
 void ngx_stream_init_connection(ngx_connection_t *c);
-void ngx_stream_close_connection(ngx_connection_t *c);
+void ngx_stream_finalize_session(ngx_stream_session_t *s, ngx_uint_t rc);
 
 
 extern ngx_module_t  ngx_stream_module;