Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

21 lines (15 sloc) 0.647 kb
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())
Jump to Line
Something went wrong with that request. Please try again.