Project

General

Profile

Actions

Bug #1495

closed

https -> http redirection works only once after start

Added by alek almost 16 years ago. Updated almost 16 years ago.

Status:
Fixed
Priority:
Normal
Category:
core
Target version:
ASK QUESTIONS IN Forums:

Description

If I configure redirect all urls that is not match appropriate pattern to http, then this is work only for first request. After it was cached, other requests doesn't work.

How to reproduce:

config:


$SERVER["socket"] == "0.0.0.0:80" { }
$SERVER["socket"] == ":443" {
        ssl.engine = "enable" 
        include_shell "cat /home/alek/certs/lighttpd.conf" 
        $HTTP["url"] !~ "^/1.html" {
                $HTTP["host"] =~ "(.*)" {
                        url.redirect = (
                                "^/(.*)" => "http://%1/$1" 
                        )
                }
        }
}

When you go first time to https://localhost/1.html, it just shows. When you open the same url second time and again, it redirects to http://localhost/1.html.
Debug logs of two serial requests are attached.


Files

lighttpd.error.log (13.7 KB) lighttpd.error.log Debug log alek, 2007-12-26 11:40
Actions #1

Updated by alek almost 16 years ago

This was reproduced at Solaris 10 & FreeBSD 7.0

Actions #2

Updated by darix almost 16 years ago

you said:
"When you go first time to https://localhost/1.html, it just shows. When you open the same url second time and again, it redirects to http://localhost/1.html. Debug logs of two serial requests are attached."

but your config says:
"if the request is not "/1.html" redirect it to http"

the following config snippet says the same. please test that.


$SERVER["socket"] == "0.0.0.0:80" { }
$SERVER["socket"] == ":443" {
        ssl.engine = "enable" 
        include_shell "cat /home/alek/certs/lighttpd.conf" 
                $HTTP["host"] =~ "(.*)" {
                        url.redirect = (
                                "^/1.html" => "$0",
                                "^/(.*)" => "http://%1/$1" 
                        )
                }
}
Actions #3

Updated by stbuehler almost 16 years ago

  • Status changed from New to Fixed
  • Resolution set to duplicate

I think this is a problem with condition caching, see #1164.

Actions

Also available in: Atom