From 7b54172b87f4e0904e90848090b6035401e427d8 Mon Sep 17 00:00:00 2001 From: Aaron Parecki Date: Sat, 20 Feb 2016 17:36:08 -0800 Subject: [PATCH] add slash if no path is given --- controllers/Parse.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/controllers/Parse.php b/controllers/Parse.php index 20498fe..3871d50 100644 --- a/controllers/Parse.php +++ b/controllers/Parse.php @@ -59,6 +59,10 @@ class Parse { ]); } + if(parse_url($url, PHP_URL_PATH) == '') { + $url = $url . '/'; + } + // Now fetch the URL and check for any curl errors $result = $this->http->get($url);