Mercurial > hg > nginx
comparison src/http/modules/ngx_http_rewrite_module.c @ 2347:dc52b3f7591e stable-0.6
r2055 merge:
auto detect https redirect in rewrite
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Thu, 27 Nov 2008 14:13:48 +0000 |
parents | 4c43e25d11ea |
children |
comparison
equal
deleted
inserted
replaced
2346:b274942c09c3 | 2347:dc52b3f7591e |
---|---|
355 regex->status = NGX_HTTP_MOVED_TEMPORARILY; | 355 regex->status = NGX_HTTP_MOVED_TEMPORARILY; |
356 regex->redirect = 1; | 356 regex->redirect = 1; |
357 last = 1; | 357 last = 1; |
358 } | 358 } |
359 | 359 |
360 if (ngx_strncmp(value[2].data, "https://", sizeof("https://") - 1) == 0) { | |
361 regex->status = NGX_HTTP_MOVED_TEMPORARILY; | |
362 regex->redirect = 1; | |
363 last = 1; | |
364 } | |
365 | |
360 if (cf->args->nelts == 4) { | 366 if (cf->args->nelts == 4) { |
361 if (ngx_strcmp(value[3].data, "last") == 0) { | 367 if (ngx_strcmp(value[3].data, "last") == 0) { |
362 last = 1; | 368 last = 1; |
363 | 369 |
364 } else if (ngx_strcmp(value[3].data, "break") == 0) { | 370 } else if (ngx_strcmp(value[3].data, "break") == 0) { |