You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by jo...@apache.org on 2011/11/10 22:45:49 UTC

svn commit: r1200581 - in /httpd/test/framework/trunk/t: htdocs/modules/lua/test.lua modules/lua.t

Author: jorton
Date: Thu Nov 10 21:45:49 2011
New Revision: 1200581

URL: http://svn.apache.org/viewvc?rev=1200581&view=rev
Log:
- test is_https field

Modified:
    httpd/test/framework/trunk/t/htdocs/modules/lua/test.lua
    httpd/test/framework/trunk/t/modules/lua.t

Modified: httpd/test/framework/trunk/t/htdocs/modules/lua/test.lua
URL: http://svn.apache.org/viewvc/httpd/test/framework/trunk/t/htdocs/modules/lua/test.lua?rev=1200581&r1=1200580&r2=1200581&view=diff
==============================================================================
--- httpd/test/framework/trunk/t/htdocs/modules/lua/test.lua (original)
+++ httpd/test/framework/trunk/t/htdocs/modules/lua/test.lua Thu Nov 10 21:45:49 2011
@@ -18,3 +18,11 @@ end
 function handle_201(r)
    r.status = 201
 end
+
+function handle_https(r)
+   if r.is_https then
+      r:puts("yep")
+   else
+      r:puts("nope")
+   end
+end

Modified: httpd/test/framework/trunk/t/modules/lua.t
URL: http://svn.apache.org/viewvc/httpd/test/framework/trunk/t/modules/lua.t?rev=1200581&r1=1200580&r2=1200581&view=diff
==============================================================================
--- httpd/test/framework/trunk/t/modules/lua.t (original)
+++ httpd/test/framework/trunk/t/modules/lua.t Thu Nov 10 21:45:49 2011
@@ -9,6 +9,10 @@ use Apache::TestConfig ();
 my $config = Apache::Test::config();
 my $server = $config->server;
 my $version = $server->{version};
+my $scheme = Apache::Test::vars()->{scheme};
+
+my $https = "nope";
+$https = "yep" if $scheme eq "https";
 
 my $pfx = "/modules/lua";
 
@@ -19,6 +23,7 @@ my @ts = (
     { url => "$pfx/test_version", rcontent => qr(^$version) },
     { url => "$pfx/test_method", rcontent => "GET" },
     { url => "$pfx/test_201", rcontent => "", code => 201 },
+    { url => "$pfx/test_https", rcontent => $https },
 );
 
 plan tests => 3 * scalar @ts, need 'lua';