From b9e4b6dd49e8f2c56025df8424137144723d2021 Mon Sep 17 00:00:00 2001 From: Craig Andrews Date: Sun, 13 Sep 2009 17:30:50 -0400 Subject: Generate ETags for pages which don't specify themselves. --- index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'index.php') diff --git a/index.php b/index.php index 7669778f6..72ceb45df 100644 --- a/index.php +++ b/index.php @@ -227,7 +227,7 @@ function main() try { if ($action_obj->prepare($args)) { - $action_obj->handle($args); + $action_obj->handleWrapper($args); } } catch (ClientException $cex) { $cac = new ClientErrorAction($cex->getMessage(), $cex->getCode()); -- cgit v1.2.3 From e80fad7ad9bd0bee6a9cf4cfd1615a9b07277364 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Sat, 19 Sep 2009 15:06:16 -0400 Subject: handle Godaddy-style PATH_INFO which includes the script --- index.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'index.php') diff --git a/index.php b/index.php index 72ceb45df..fa94f0c75 100644 --- a/index.php +++ b/index.php @@ -32,7 +32,13 @@ function getPath($req) && array_key_exists('p', $req)) { return $req['p']; } else if (array_key_exists('PATH_INFO', $_SERVER)) { - return $_SERVER['PATH_INFO']; + $path = $_SERVER['PATH_INFO']; + $script = $_SERVER['SCRIPT_NAME']; + if (substr($path, 0, mb_strlen($script)) == $script) { + return substr($path, mb_strlen($script)); + } else { + return $path; + } } else { return null; } -- cgit v1.2.3 From 42ba05de5fa9413ce0f383cfdafa7288e291ab17 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Wed, 23 Sep 2009 09:33:40 -0400 Subject: revert output buffering (costly) for ETags (low priority) --- index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'index.php') diff --git a/index.php b/index.php index fa94f0c75..362ab3cd3 100644 --- a/index.php +++ b/index.php @@ -233,7 +233,7 @@ function main() try { if ($action_obj->prepare($args)) { - $action_obj->handleWrapper($args); + $action_obj->handle($args); } } catch (ClientException $cex) { $cac = new ClientErrorAction($cex->getMessage(), $cex->getCode()); -- cgit v1.2.3