Mercurial > hg > nginx
comparison src/http/ngx_http_upstream.c @ 2667:c1ac00c2bc75
update r2664
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Sat, 04 Apr 2009 17:22:26 +0000 |
parents | 81556a9b6488 |
children | 5e4d8bd4486c |
comparison
equal
deleted
inserted
replaced
2666:81556a9b6488 | 2667:c1ac00c2bc75 |
---|---|
2889 n = ngx_atoi(p, len); | 2889 n = ngx_atoi(p, len); |
2890 | 2890 |
2891 switch (n) { | 2891 switch (n) { |
2892 case 0: | 2892 case 0: |
2893 r->upstream->cacheable = 0; | 2893 r->upstream->cacheable = 0; |
2894 break; | |
2895 | |
2896 case NGX_ERROR: | 2894 case NGX_ERROR: |
2897 break; | 2895 return NGX_OK; |
2898 | 2896 |
2899 default: | 2897 default: |
2900 r->cache->valid_sec = ngx_time() + n; | 2898 r->cache->valid_sec = ngx_time() + n; |
2901 break; | 2899 return NGX_OK; |
2902 } | 2900 } |
2903 | 2901 } |
2904 } else { | 2902 |
2905 p++; | 2903 p++; |
2906 len--; | 2904 len--; |
2907 | 2905 |
2908 n = ngx_atoi(p, len); | 2906 n = ngx_atoi(p, len); |
2909 | 2907 |
2910 if (n != NGX_ERROR) { | 2908 if (n != NGX_ERROR) { |
2911 r->cache->valid_sec = n; | 2909 r->cache->valid_sec = n; |
2912 } | |
2913 } | 2910 } |
2914 | 2911 |
2915 return NGX_OK; | 2912 return NGX_OK; |
2916 } | 2913 } |
2917 | 2914 |