Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 34 lines (26 sloc) 0.82 kB
07a5011 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@3300 5dc97367-9…
alobbs authored
1 from base import *
2
3 MAGIC="Alvaro: http://www.alobbs.com/"
4
5 DIR = "229"
6 FILE = "file"
7
8 CONF = """
9 vserver!1!rule!2290!match = fullpath
10 vserver!1!rule!2290!match!fullpath!1 = /%s/%s
11 vserver!1!rule!2290!handler = cgi
12 """
13
14 CGI_BASE = """#!/bin/sh
15 echo "Content-type: text/html"
16 echo ""
17 echo "%s"
18 """ % (MAGIC)
19
20 class Test (TestBase):
21 def __init__ (self):
22 TestBase.__init__ (self, __file__)
23 self.name = "FullPath: simple"
24 self.request = "GET /%s/%s HTTP/1.0\r\n" % (DIR, FILE)
25 self.expected_error = 200
26 self.expected_content = MAGIC
27 self.forbidden_content = ["/bin/sh", "echo"]
28 self.conf = CONF % (DIR, FILE)
29
30 def Prepare (self, www):
31 d = self.Mkdir (www, DIR)
32 self.WriteFile (d, FILE, 0755, CGI_BASE)
33
Something went wrong with that request. Please try again.