Mercurial > hg > nginx-vendor-1-0
comparison src/http/ngx_http_script.c @ 190:3689cd4e3228 NGINX_0_3_42
nginx 0.3.42
*) Feature: the "bind" option of the "listen" directive in IMAP/POP3
proxy.
*) Bugfix: if the same capture in the "rewrite" directive was used more
then once.
*) Bugfix: the $sent_http_content_type, $sent_http_content_length,
$sent_http_last_modified, $sent_http_connection,
$sent_http_keep_alive, and $sent_http_transfer_encoding variables
were not written to access log.
*) Bugfix: the $sent_http_cache_control returned value of the single
"Cache-Control" response header line.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Wed, 26 Apr 2006 00:00:00 +0400 |
parents | 54aabf2b0bc6 |
children | ca5f86d94316 |
comparison
equal
deleted
inserted
replaced
189:fca7768a4aca | 190:3689cd4e3228 |
---|---|
89 goto invalid_variable; | 89 goto invalid_variable; |
90 } | 90 } |
91 | 91 |
92 if (sc->source->data[i] >= '1' && sc->source->data[i] <= '9') { | 92 if (sc->source->data[i] >= '1' && sc->source->data[i] <= '9') { |
93 | 93 |
94 n = sc->source->data[i] - '0'; | |
95 | |
96 if (sc->captures_mask & (1 << n)) { | |
97 sc->dup_capture = 1; | |
98 } | |
99 | |
100 sc->captures_mask |= 1 << n; | |
101 | |
94 copy_capture = ngx_http_script_add_code(*sc->lengths, | 102 copy_capture = ngx_http_script_add_code(*sc->lengths, |
95 sizeof(ngx_http_script_copy_capture_code_t), | 103 sizeof(ngx_http_script_copy_capture_code_t), |
96 NULL); | 104 NULL); |
97 if (copy_capture == NULL) { | 105 if (copy_capture == NULL) { |
98 return NGX_ERROR; | 106 return NGX_ERROR; |
99 } | 107 } |
100 | 108 |
101 copy_capture->code = (ngx_http_script_code_pt) | 109 copy_capture->code = (ngx_http_script_code_pt) |
102 ngx_http_script_copy_capture_len_code; | 110 ngx_http_script_copy_capture_len_code; |
103 copy_capture->n = 2 * (sc->source->data[i] - '0'); | 111 copy_capture->n = 2 * n; |
112 | |
104 | 113 |
105 copy_capture = ngx_http_script_add_code(*sc->values, | 114 copy_capture = ngx_http_script_add_code(*sc->values, |
106 sizeof(ngx_http_script_copy_capture_code_t), | 115 sizeof(ngx_http_script_copy_capture_code_t), |
107 &sc->main); | 116 &sc->main); |
108 if (copy_capture == NULL) { | 117 if (copy_capture == NULL) { |
109 return NGX_ERROR; | 118 return NGX_ERROR; |
110 } | 119 } |
111 | 120 |
112 copy_capture->code = ngx_http_script_copy_capture_code; | 121 copy_capture->code = ngx_http_script_copy_capture_code; |
113 copy_capture->n = sc->source->data[i] - '0'; | 122 copy_capture->n = 2 * n; |
114 | 123 |
115 if (sc->ncaptures < copy_capture->n) { | 124 if (sc->ncaptures < n) { |
116 sc->ncaptures = copy_capture->n; | 125 sc->ncaptures = n; |
117 } | 126 } |
118 | |
119 copy_capture->n *= 2; | |
120 | 127 |
121 i++; | 128 i++; |
122 | 129 |
123 continue; | 130 continue; |
124 } | 131 } |