From ebeca952cf572f15ce78f5b903cd598288b3dc1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20Sessing=C3=B8?= Date: Wed, 8 Nov 2017 04:09:41 +0100 Subject: [PATCH 1/3] Revert "V3 development" --- README.md | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/README.md b/README.md index f416e0d..7817f6a 100644 --- a/README.md +++ b/README.md @@ -212,18 +212,6 @@ Simply create a new `web.config` file in your projects `public` directory and pa ``` -#### Troubleshoting - -If you do not have a favicon.ico file in your project, you can get `404 Router::notFoundException()` constantly. -To add `favicon.ico` as exception, you can add this line to the `` group: -`````` - -You can also make one exception for files with some extensions: -`````` - -If you are using `$_SERVER['ORIG_PATH_INFO']`, you will get `\index.php\` as part of the returned value. By sample: -```/index.php/test/mypage.php``` - ### Configuration Create a new file, name it `routes.php` and place it in your library folder. This will be the file where you define all the routes for your project. From 6ad22a3816c2bce33ba956a190b04014438fa137 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20Sessing=C3=B8?= Date: Wed, 8 Nov 2017 04:11:40 +0100 Subject: [PATCH 2/3] Revert "Revert "V3 development"" --- README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/README.md b/README.md index 7817f6a..f416e0d 100644 --- a/README.md +++ b/README.md @@ -212,6 +212,18 @@ Simply create a new `web.config` file in your projects `public` directory and pa ``` +#### Troubleshoting + +If you do not have a favicon.ico file in your project, you can get `404 Router::notFoundException()` constantly. +To add `favicon.ico` as exception, you can add this line to the `` group: +`````` + +You can also make one exception for files with some extensions: +`````` + +If you are using `$_SERVER['ORIG_PATH_INFO']`, you will get `\index.php\` as part of the returned value. By sample: +```/index.php/test/mypage.php``` + ### Configuration Create a new file, name it `routes.php` and place it in your library folder. This will be the file where you define all the routes for your project. From d4a6d504b161f03908479a96c9815407eaae753c Mon Sep 17 00:00:00 2001 From: Matheus Date: Sat, 10 Nov 2018 22:16:45 -0200 Subject: [PATCH 3/3] Set HTTP method before initializing InputHandler This is needed because without it the InputHandler doesn't know which http method is being used, and because of that it can't parse the body of a PUT request --- src/Pecee/Http/Request.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Pecee/Http/Request.php b/src/Pecee/Http/Request.php index cf7cc32..31dc0ae 100644 --- a/src/Pecee/Http/Request.php +++ b/src/Pecee/Http/Request.php @@ -84,7 +84,8 @@ class Request // Check if special IIS header exist, otherwise use default. $this->setUrl(new Url($this->getHeader('unencoded-url', $this->getHeader('request-uri')))); - + + $this->method = strtolower($this->getHeader('request-method')); $this->inputHandler = new InputHandler($this); $this->method = strtolower($this->inputHandler->value('_method', $this->getHeader('request-method'))); } @@ -425,4 +426,4 @@ class Request return $this->data[$name] ?? null; } -} \ No newline at end of file +}