Tests: added PATH_INFO variable test.
This commit is contained in:
@@ -4,6 +4,7 @@ $body = file_get_contents('php://input');
|
||||
header('Content-Length: ' . strlen($body));
|
||||
header('Request-Method: ' . $_SERVER['REQUEST_METHOD']);
|
||||
header('Request-Uri: ' . $_SERVER['REQUEST_URI']);
|
||||
header('Path-Info: ' . $_SERVER['PATH_INFO']);
|
||||
header('Http-Host: ' . $_SERVER['HTTP_HOST']);
|
||||
header('Server-Protocol: ' . $_SERVER['SERVER_PROTOCOL']);
|
||||
header('Server-Software: ' . $_SERVER['SERVER_SOFTWARE']);
|
||||
|
||||
@@ -24,6 +24,7 @@ class TestPHPApplication(TestApplicationPHP):
|
||||
'Connection': 'close',
|
||||
},
|
||||
body=body,
|
||||
url='/index.php/blah?var=val'
|
||||
)
|
||||
|
||||
self.assertEqual(resp['status'], 200, 'status')
|
||||
@@ -54,7 +55,8 @@ class TestPHPApplication(TestApplicationPHP):
|
||||
'Connection': 'close',
|
||||
'Content-Length': str(len(body)),
|
||||
'Request-Method': 'POST',
|
||||
'Request-Uri': '/',
|
||||
'Path-Info': '/blah',
|
||||
'Request-Uri': '/index.php/blah?var=val',
|
||||
'Http-Host': 'localhost',
|
||||
'Server-Protocol': 'HTTP/1.1',
|
||||
'Custom-Header': 'blah',
|
||||
|
||||
Reference in New Issue
Block a user