]> git.kaiwu.me - nginx.git/commitdiff
fix r3628
authorIgor Sysoev <igor@sysoev.ru>
Tue, 15 Jun 2010 15:27:06 +0000 (15:27 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Tue, 15 Jun 2010 15:27:06 +0000 (15:27 +0000)
src/http/modules/ngx_http_proxy_module.c
src/http/modules/ngx_http_uwsgi_module.c

index 94ef736602f76604925dddf2bd2eeeaacaf2cf18..de591a7fcf2a1f5222440155488eb463c7dfe8b7 100644 (file)
@@ -83,9 +83,6 @@ typedef struct {
 } ngx_http_proxy_ctx_t;
 
 
-#define NGX_HTTP_PROXY_PARSE_NO_HEADER  20
-
-
 static ngx_int_t ngx_http_proxy_eval(ngx_http_request_t *r,
     ngx_http_proxy_ctx_t *ctx, ngx_http_proxy_loc_conf_t *plcf);
 #if (NGX_HTTP_CACHE)
index b5476836b879c9ecae82a3c99abf09df68d4d1b1..d949826a6e835f27406775330b7abe59ef3cf408 100644 (file)
@@ -36,17 +36,6 @@ typedef struct {
 } ngx_http_uwsgi_loc_conf_t;
 
 
-typedef struct {
-    ngx_uint_t                 status;
-    ngx_uint_t                 status_count;
-    u_char                    *status_start;
-    u_char                    *status_end;
-} ngx_http_uwsgi_ctx_t;
-
-
-#define NGX_HTTP_UWSGI_PARSE_NO_HEADER  20
-
-
 static ngx_int_t ngx_http_uwsgi_eval(ngx_http_request_t *r,
     ngx_http_uwsgi_loc_conf_t *uwcf);
 static ngx_int_t ngx_http_uwsgi_create_request(ngx_http_request_t *r);
@@ -424,8 +413,8 @@ static ngx_int_t
 ngx_http_uwsgi_handler(ngx_http_request_t *r)
 {
     ngx_int_t                   rc;
+    ngx_http_status_t          *status;
     ngx_http_upstream_t        *u;
-    ngx_http_uwsgi_ctx_t       *ctx;
     ngx_http_uwsgi_loc_conf_t  *uwcf;
 
     if (r->subrequest_in_memory) {
@@ -439,12 +428,12 @@ ngx_http_uwsgi_handler(ngx_http_request_t *r)
         return NGX_HTTP_INTERNAL_SERVER_ERROR;
     }
 
-    ctx = ngx_pcalloc(r->pool, sizeof(ngx_http_uwsgi_ctx_t));
-    if (ctx == NULL) {
+    status = ngx_pcalloc(r->pool, sizeof(ngx_http_status_t));
+    if (status == NULL) {
         return NGX_HTTP_INTERNAL_SERVER_ERROR;
     }
 
-    ngx_http_set_ctx(r, ctx, ngx_http_uwsgi_module);
+    ngx_http_set_ctx(r, status, ngx_http_uwsgi_module);
 
     uwcf = ngx_http_get_module_loc_conf(r, ngx_http_uwsgi_module);
 
@@ -844,18 +833,18 @@ ngx_http_uwsgi_create_request(ngx_http_request_t *r)
 static ngx_int_t
 ngx_http_uwsgi_reinit_request(ngx_http_request_t *r)
 {
-    ngx_http_uwsgi_ctx_t  *ctx;
+    ngx_http_status_t  *status;
 
-    ctx = ngx_http_get_module_ctx(r, ngx_http_uwsgi_module);
+    status = ngx_http_get_module_ctx(r, ngx_http_uwsgi_module);
 
-    if (ctx == NULL) {
+    if (status == NULL) {
         return NGX_OK;
     }
 
-    ctx->status = 0;
-    ctx->status_count = 0;
-    ctx->status_start = NULL;
-    ctx->status_end = NULL;
+    status->code = 0;
+    status->count = 0;
+    status->start = NULL;
+    status->end = NULL;
 
     r->upstream->process_header = ngx_http_uwsgi_process_status_line;