Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 25 lines (19 sloc) 0.761 kb
ee8c4ad @alobbs Adds a new QA test to check whether the OPTIONS method works fine with
alobbs authored
1 from base import *
2
3 DIR = "268_options_php1"
4 FILE = "file.php"
5
6 CONTENT = "This is inside the file"
7 FORBIDDEN = "Should not appear"
8
9 class Test (TestBase):
10 def __init__ (self):
11 TestBase.__init__ (self, __file__)
12 self.name = "OPTIONS: PHP request"
13 self.request = "OPTIONS /%(DIR)s/%(FILE)s HTTP/1.0\r\n" % (globals())
14 self.expected_error = 200
15 self.expected_content = CONTENT
16 self.forbidden_content = FORBIDDEN
17
18 def Prepare (self, www):
19 d = self.Mkdir (www, DIR)
20 self.WriteFile (d, FILE, 0444,
21 "<?php /* %(FORBIDDEN)s */ echo '%(CONTENT)s'; ?>" %(globals()))
22
23 def Precondition (self):
24 return os.path.exists (look_for_php())
Something went wrong with that request. Please try again.