Browse code

URL parsing mechanizm change to server env variable based

RafaƂ Szklarczyk authored on 23/08/2019 13:22:58
Showing 1 changed files
... ...
@@ -12,8 +12,8 @@ class Request{
12 12
     public $headers;
13 13
     public $body;
14 14
     public function __construct(){
15
-        if(isset($_GET['path']))
16
-            $this->path = $_GET['path'];
15
+        if(isset($_SERVER['L3_PATH']))
16
+            $this->path = $_SERVER['L3_PATH'];
17 17
         $this->method = $_SERVER['REQUEST_METHOD'];
18 18
         $this->accept = isset($_SERVER['HTTP_ACCEPT'])?$_SERVER['HTTP_ACCEPT']:"";
19 19
         $this->acceptTypes = $this->parseAccept($this->accept);