The standard way the TestBot checks the https connection is with '$UseSSL && ! SecureConnection())' so use that form in CheckSecurePage() too. This actually simplifies it too.
Signed-off-by: Francois Gouget fgouget@codeweavers.com --- testbot/lib/WineTestBot/CGI/PageBase.pm | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/testbot/lib/WineTestBot/CGI/PageBase.pm b/testbot/lib/WineTestBot/CGI/PageBase.pm index d1442c1e5..c1a8c8cbf 100644 --- a/testbot/lib/WineTestBot/CGI/PageBase.pm +++ b/testbot/lib/WineTestBot/CGI/PageBase.pm @@ -73,12 +73,10 @@ sub CheckSecurePage($$) { my ($self, $Page) = @_;
- if (! $UseSSL || SecureConnection()) + if ($UseSSL && ! SecureConnection()) { - return; + $self->Redirect($Page, MakeSecureURL($ENV{"REQUEST_URI"})); } - - $self->Redirect($Page, MakeSecureURL($ENV{"REQUEST_URI"})); }
sub GenerateHttpHeaders($)