comparison src/http/modules/ngx_http_rewrite_module.c @ 2054:989176d3ffc5

auto detect https redirect in rewrite
author Igor Sysoev <igor@sysoev.ru>
date Fri, 20 Jun 2008 14:48:28 +0000
parents f321b59ae0e9
children 912ce4113f21
comparison
equal deleted inserted replaced
2053:dd5ca07f5cdd 2054:989176d3ffc5
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) {