From 474f7fc2f6e75acfa4898a4d2c561f6f73c80ff1 Mon Sep 17 00:00:00 2001 From: "J. King" Date: Sat, 30 Sep 2017 12:05:57 -0400 Subject: [PATCH] Changelog; CS fixes --- CHANGELOG | 12 ++++++++++++ build.xml | 1 + dist/nginx-fcgi.conf | 3 ++- lib/REST.php | 6 +++--- lib/REST/Request.php | 2 +- tests/docroot/Feed/Discovery/Invalid.php | 2 +- tests/docroot/Feed/Discovery/Valid.php | 2 +- 7 files changed, 21 insertions(+), 7 deletions(-) create mode 100644 CHANGELOG diff --git a/CHANGELOG b/CHANGELOG new file mode 100644 index 0000000..451ce8a --- /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 5524305..25753f7 100644 --- a/build.xml +++ b/build.xml @@ -11,6 +11,7 @@ + diff --git a/dist/nginx-fcgi.conf b/dist/nginx-fcgi.conf index fc76d31..fb37825 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 e102376..f0a5b37 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 2eda047..c21ca48 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 59f7e6e..9a2f49f 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 293ea19..9f34f71 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 +];