Changeset b6797e


Ignore:
Timestamp:
02/04/09 21:15:09 (3 years ago)
Author:
George Potapov <nephrite@…>
Branches:
master-v0.7, upstream_count_limit
Children:
ad7c65, c522ec
Parents:
a81aea
git-author:
George Potapov <nephrite@…> (02/04/09 21:15:09)
git-committer:
George Potapov <nephrite@…> (02/04/09 21:15:09)
Message:

removed duplicate code which interfered with upstream request processing

Location:
server/src/http
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • server/src/http/modules/ngx_http_fastcgi_module.c

    ra9b74b rb6797e  
    166166    { ngx_string("http_503"), NGX_HTTP_UPSTREAM_FT_HTTP_503 }, 
    167167    { ngx_string("http_504"), NGX_HTTP_UPSTREAM_FT_HTTP_504 }, 
    168     { ngx_string("http_507"), NGX_HTTP_UPSTREAM_FT_HTTP_507 }, 
    169168    { ngx_string("http_404"), NGX_HTTP_UPSTREAM_FT_HTTP_404 }, 
    170169    { ngx_string("off"), NGX_HTTP_UPSTREAM_FT_OFF }, 
  • server/src/http/modules/ngx_http_proxy_module.c

    r9941a7 rb6797e  
    152152    { ngx_string("http_503"), NGX_HTTP_UPSTREAM_FT_HTTP_503 }, 
    153153    { ngx_string("http_504"), NGX_HTTP_UPSTREAM_FT_HTTP_504 }, 
    154     { ngx_string("http_507"), NGX_HTTP_UPSTREAM_FT_HTTP_507 }, 
    155154    { ngx_string("http_404"), NGX_HTTP_UPSTREAM_FT_HTTP_404 }, 
    156155    { ngx_string("off"), NGX_HTTP_UPSTREAM_FT_OFF }, 
  • server/src/http/ngx_http_upstream.c

    ra9b74b rb6797e  
    11251125    ngx_http_upstream_header_t     *hh; 
    11261126    ngx_http_upstream_main_conf_t  *umcf; 
    1127     ngx_http_core_loc_conf_t       *clcf; 
    1128     ngx_http_err_page_t            *err_page; 
    11291127 
    11301128    c = u->peer.connection; 
     
    12571255        if (ngx_http_upstream_intercept_errors(r, u) == NGX_OK) { 
    12581256            return; 
    1259         } 
    1260     } 
    1261  
    1262     if (u->headers_in.status_n == NGX_HTTP_BAD_GATEWAY) { 
    1263  
    1264         if (u->peer.tries > 1 
    1265             && u->conf->next_upstream & NGX_HTTP_UPSTREAM_FT_HTTP_502) 
    1266         { 
    1267             ngx_http_upstream_next(r, u, NGX_HTTP_UPSTREAM_FT_HTTP_502); 
    1268             return; 
    1269         } 
    1270     } 
    1271  
    1272     if (u->headers_in.status_n == NGX_HTTP_SERVICE_UNAVAILABLE) { 
    1273  
    1274         if (u->peer.tries > 1 
    1275             && u->conf->next_upstream & NGX_HTTP_UPSTREAM_FT_HTTP_503) 
    1276         { 
    1277             ngx_http_upstream_next(r, u, NGX_HTTP_UPSTREAM_FT_HTTP_503); 
    1278             return; 
    1279         } 
    1280     } 
    1281  
    1282     if (u->headers_in.status_n == NGX_HTTP_GATEWAY_TIME_OUT) { 
    1283  
    1284         if (u->peer.tries > 1 
    1285             && u->conf->next_upstream & NGX_HTTP_UPSTREAM_FT_HTTP_504) 
    1286         { 
    1287             ngx_http_upstream_next(r, u, NGX_HTTP_UPSTREAM_FT_HTTP_504); 
    1288             return; 
    1289         } 
    1290     } 
    1291  
    1292     if (u->headers_in.status_n == NGX_HTTP_INSUFFICIENT_STORAGE) { 
    1293  
    1294         if (u->peer.tries > 1 
    1295             && u->conf->next_upstream & NGX_HTTP_UPSTREAM_FT_HTTP_507) 
    1296         { 
    1297             ngx_http_upstream_next(r, u, NGX_HTTP_UPSTREAM_FT_HTTP_507); 
    1298             return; 
    1299         } 
    1300     } 
    1301  
    1302     if (u->headers_in.status_n >= NGX_HTTP_BAD_REQUEST 
    1303         && u->conf->intercept_errors) 
    1304     { 
    1305         clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module); 
    1306  
    1307         if (clcf->error_pages) { 
    1308  
    1309             err_page = clcf->error_pages->elts; 
    1310             for (i = 0; i < clcf->error_pages->nelts; i++) { 
    1311                 if (err_page[i].status == (ngx_int_t) u->headers_in.status_n) { 
    1312  
    1313                     if (u->headers_in.status_n == NGX_HTTP_UNAUTHORIZED) { 
    1314  
    1315                         r->headers_out.www_authenticate = 
    1316                                         ngx_list_push(&r->headers_out.headers); 
    1317  
    1318                         if (r->headers_out.www_authenticate == NULL) { 
    1319                             ngx_http_upstream_finalize_request(r, u, 
    1320                                                NGX_HTTP_INTERNAL_SERVER_ERROR); 
    1321                             return; 
    1322                         } 
    1323  
    1324                         *r->headers_out.www_authenticate = 
    1325                                                *u->headers_in.www_authenticate; 
    1326                     } 
    1327  
    1328                     ngx_http_upstream_finalize_request(r, u, 
    1329                                                        u->headers_in.status_n); 
    1330                     return; 
    1331                 } 
    1332             } 
    13331257        } 
    13341258    } 
     
    24802404        switch(ft_type) { 
    24812405 
    2482         case NGX_HTTP_UPSTREAM_FT_HTTP_504: 
    24832406        case NGX_HTTP_UPSTREAM_FT_TIMEOUT: 
    24842407            status = NGX_HTTP_GATEWAY_TIME_OUT; 
     
    24912414        case NGX_HTTP_UPSTREAM_FT_HTTP_404: 
    24922415            status = NGX_HTTP_NOT_FOUND; 
    2493             break; 
    2494  
    2495         case NGX_HTTP_UPSTREAM_FT_HTTP_502: 
    2496             status = NGX_HTTP_BAD_GATEWAY; 
    2497             break; 
    2498  
    2499         case NGX_HTTP_UPSTREAM_FT_HTTP_503: 
    2500             status = NGX_HTTP_SERVICE_UNAVAILABLE; 
    2501             break; 
    2502  
    2503         case NGX_HTTP_UPSTREAM_FT_HTTP_507: 
    2504             status = NGX_HTTP_INSUFFICIENT_STORAGE; 
    25052416            break; 
    25062417 
  • server/src/http/ngx_http_upstream.h

    r9941a7 rb6797e  
    2727#define NGX_HTTP_UPSTREAM_FT_BUSY_LOCK       0x00000200 
    2828#define NGX_HTTP_UPSTREAM_FT_MAX_WAITING     0x00000400 
    29 #define NGX_HTTP_UPSTREAM_FT_HTTP_507        0x00000800 
    3029#define NGX_HTTP_UPSTREAM_FT_NOLIVE          0x40000000 
    3130#define NGX_HTTP_UPSTREAM_FT_OFF             0x80000000 
Note: See TracChangeset for help on using the changeset viewer.