~ubuntu-branches/debian/squeeze/nginx/squeeze

« back to all changes in this revision

Viewing changes to src/http/modules/ngx_http_rewrite_module.c

  • Committer: Bazaar Package Importer
  • Author(s): Kartik Mistry
  • Date: 2010-06-16 01:26:51 UTC
  • mfrom: (1.1.16 upstream)
  • Revision ID: james.westby@ubuntu.com-20100616012651-0kldmspg3i91mynk
Tags: 0.7.67-1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
340
340
 
341
341
    last = 0;
342
342
 
343
 
    if (ngx_strncmp(value[2].data, "http://", sizeof("http://") - 1) == 0) {
344
 
        regex->status = NGX_HTTP_MOVED_TEMPORARILY;
345
 
        regex->redirect = 1;
346
 
        last = 1;
347
 
    }
348
 
 
349
 
    if (ngx_strncmp(value[2].data, "https://", sizeof("https://") - 1) == 0) {
 
343
    if (ngx_strncmp(value[2].data, "http://", sizeof("http://") - 1) == 0
 
344
        || ngx_strncmp(value[2].data, "https://", sizeof("https://") - 1) == 0
 
345
        || ngx_strncmp(value[2].data, "$scheme", sizeof("$scheme") - 1) == 0)
 
346
    {
350
347
        regex->status = NGX_HTTP_MOVED_TEMPORARILY;
351
348
        regex->redirect = 1;
352
349
        last = 1;