Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 37 lines (28 sloc) 1.107 kB
b93599f @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@3123 5dc97367-9…
alobbs authored
1 from base import *
2
3 SERVER = "redir_paths_1"
4 MAGIC = 'Reproducing bug report #432'
5
6 CONF = """
7 vserver!2270!nick = %s
8 vserver!2270!document_root = %s
9
10 vserver!2270!rule!1!match = default
11 vserver!2270!rule!1!handler = file
12
13 vserver!2270!rule!10!match = request
14 vserver!2270!rule!10!match!request = file.*
15 vserver!2270!rule!10!handler = redir
16 vserver!2270!rule!10!handler!rewrite!1!show = 0
17 vserver!2270!rule!10!handler!rewrite!1!regex = (.*)
18 vserver!2270!rule!10!handler!rewrite!1!substring = internal.txt
19 """
20
21 class Test (TestBase):
22 def __init__ (self):
23 TestBase.__init__ (self, __file__)
24 self.name = "Internal Redir: Paths"
25 self.request = "GET /in/file.foo HTTP/1.1\r\n" + \
26 "Host: %s\r\n" % (SERVER) + \
27 "Connection: Close\r\n"
28 self.expected_error = 200
29 self.expected_content = MAGIC
30
31 def Prepare (self, www):
32 d = self.Mkdir (www, "%s_droot/in"%(SERVER))
33 self.WriteFile (d, "internal.txt", 0444, MAGIC)
34
35 self.conf = CONF % (SERVER, d)
36
Something went wrong with that request. Please try again.