diff --git a/CHANGELOG b/CHANGELOG new file mode 100644 index 00000000..451ce8a6 --- /dev/null +++ b/CHANGELOG @@ -0,0 +1,12 @@ +Version 0.1.1 (2017-09-30) +========================== + +Bug fixes: +- Perform feed discovery like NextCloud News does +- Respond correctly to HEAD requests +- Various minor fixes + +Version 0.1.0 (2017-08-29) +========================== + +Initial release \ No newline at end of file diff --git a/build.xml b/build.xml index 5524305a..25753f7f 100644 --- a/build.xml +++ b/build.xml @@ -11,6 +11,7 @@ + diff --git a/dist/nginx-fcgi.conf b/dist/nginx-fcgi.conf index fc76d315..fb378259 100644 --- a/dist/nginx-fcgi.conf +++ b/dist/nginx-fcgi.conf @@ -9,4 +9,5 @@ fastcgi_param REQUEST_METHOD $request_method; fastcgi_param CONTENT_TYPE $content_type; fastcgi_param CONTENT_LENGTH $content_length; fastcgi_param REQUEST_URI $request_uri; -fastcgi_param HTTPS $https if_not_empty; \ No newline at end of file +fastcgi_param HTTPS $https if_not_empty; +fastcgi_param REMOTE_USER $remote_user; \ No newline at end of file diff --git a/lib/REST.php b/lib/REST.php index e1023761..f0a5b37c 100644 --- a/lib/REST.php +++ b/lib/REST.php @@ -40,9 +40,9 @@ class REST { $class = $this->apis[$api]['class']; $drv = new $class(); if ($req->head) { - $res = $drv->dispatch($req); - $res->head = true; - return $res; + $res = $drv->dispatch($req); + $res->head = true; + return $res; } else { return $drv->dispatch($req); } diff --git a/lib/REST/Request.php b/lib/REST/Request.php index 2eda0477..c21ca484 100644 --- a/lib/REST/Request.php +++ b/lib/REST/Request.php @@ -27,7 +27,7 @@ class Request { $this->url = $url; $this->body = $body; $this->type = $contentType; - if($this->method=="HEAD") { + if ($this->method=="HEAD") { $this->head = true; $this->method = "GET"; } diff --git a/tests/docroot/Feed/Discovery/Invalid.php b/tests/docroot/Feed/Discovery/Invalid.php index 59f7e6ec..9a2f49fe 100644 --- a/tests/docroot/Feed/Discovery/Invalid.php +++ b/tests/docroot/Feed/Discovery/Invalid.php @@ -5,4 +5,4 @@ Example article MESSAGE_BODY -]; \ No newline at end of file +]; diff --git a/tests/docroot/Feed/Discovery/Valid.php b/tests/docroot/Feed/Discovery/Valid.php index 293ea191..9f34f716 100644 --- a/tests/docroot/Feed/Discovery/Valid.php +++ b/tests/docroot/Feed/Discovery/Valid.php @@ -6,4 +6,4 @@ MESSAGE_BODY -]; \ No newline at end of file +];