Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
21 lines (15 sloc) 647 Bytes
from base import *
class Test (TestBase):
def __init__ (self):
TestBase.__init__ (self, __file__)
self.name = "PHP Location header"
self.request = "GET /phplocation/redir.php HTTP/1.0\r\n"
self.expected_error = 302
self.expected_content = "Location: src/login.php"
self.forbidden_content = "header("
def Prepare (self, www):
self.Mkdir (www, "phplocation")
self.WriteFile (www, "phplocation/redir.php", 0444,
'<?php header("Location: src/login.php"); ?>')
def Precondition (self):
return os.path.exists (look_for_php())
Something went wrong with that request. Please try again.