From 11261f0fe633473003c396860427f521eaf7a662 Mon Sep 17 00:00:00 2001 From: coderkun Date: Sat, 12 Sep 2015 20:54:33 +0200 Subject: [PATCH 1/4] add caching information for Apache?s ?mod_expires? module for static files --- www/.htaccess | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/www/.htaccess b/www/.htaccess index 63163a80..2980907e 100644 --- a/www/.htaccess +++ b/www/.htaccess @@ -1,3 +1,12 @@ + + AddType text/javascript .js + + ExpiresActive on + ExpiresByType image/png "access plus 1 week" + ExpiresByType image/jpeg "access plus 1 week" + ExpiresByType text/javascript "access plus 1 week" + + RewriteEngine On From a95a948841fbd1a57185b4064718c32ff512bf6b Mon Sep 17 00:00:00 2001 From: coderkun Date: Sat, 12 Sep 2015 20:55:10 +0200 Subject: [PATCH 2/4] add compression for text-based mimetypes via Apache directive --- .htaccess | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.htaccess b/.htaccess index c1167dbf..1929a851 100644 --- a/.htaccess +++ b/.htaccess @@ -4,6 +4,8 @@ ErrorDocument 403 /www/error403.html ErrorDocument 404 /www/error404.html ErrorDocument 500 /www/error500.html +AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css application/javascript text/javascript + Require all granted From 88f94709d1d9d27746e81c26568b19bce0cb0dd9 Mon Sep 17 00:00:00 2001 From: coderkun Date: Sat, 12 Sep 2015 20:55:43 +0200 Subject: [PATCH 3/4] translate some left metadata --- requests/WebRequest.inc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/requests/WebRequest.inc b/requests/WebRequest.inc index 652c1d0a..765806a2 100644 --- a/requests/WebRequest.inc +++ b/requests/WebRequest.inc @@ -259,21 +259,21 @@ */ private function detectRequest() { - // URL ermitteln + // Get URL $url = isset($_GET) && array_key_exists('url', $_GET) ? $_GET['url'] : ''; $url = trim($url, '/'); - // Routes anwenden + // Apply routes $url = $this->applyRoutes($url, $this->routes); - // URL splitten + // Split URL $params = explode('/', $url); if(empty($params[0])) { $params = array(); } - // Parameter speichern + // Save parameters $this->params = $params; } From 7b44e19569e600300bcd9cd9e9c524b5a6a66d39 Mon Sep 17 00:00:00 2001 From: coderkun Date: Sat, 28 May 2016 12:26:56 +0200 Subject: [PATCH 4/4] fix typos in some docstrings --- core/Agent.inc | 6 +++--- core/ClassLoader.inc | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/core/Agent.inc b/core/Agent.inc index fb8fe8ac..83dfcd91 100644 --- a/core/Agent.inc +++ b/core/Agent.inc @@ -107,7 +107,7 @@ * @throws \nre\exceptions\ControllerNotFoundException * @param string $agentName Name of the Agent to instantiate * @param Request $request Current request - * @param Response $respone Current respone + * @param Response $response Current respone * @param Logger $log Log-system */ public static function factory($agentName, Request $request, Response $response, Logger $log=null) @@ -165,7 +165,7 @@ * @throws \nre\exceptions\ControllerNotValidException * @throws \nre\exceptions\ControllerNotFoundException * @param Request $request Current request - * @param Response $respone Current response + * @param Response $response Current response * @param Logger $log Log-system */ protected function __construct(Request $request, Response $response, Logger $log=null) @@ -502,7 +502,7 @@ * * @param array $subAgent Original (Sub-) Agent * @param Request $request Current request - * @param Excepiton $exception Occurred exception + * @param Exception $exception Occurred exception * @return array InlineError-SubAgent */ private function errorInline($subAgent, $request, $exception) diff --git a/core/ClassLoader.inc b/core/ClassLoader.inc index e999568a..50b24c51 100644 --- a/core/ClassLoader.inc +++ b/core/ClassLoader.inc @@ -27,7 +27,7 @@ * Load a class. * * @throws \nre\exceptions\ClassNotFoundException - * @param string $className Name of the class to load + * @param string $fullClassName Name of the class to load */ public static function load($fullClassName) {