From c116af31ab916cd02591683c6c0cdbbca2b84009 Mon Sep 17 00:00:00 2001 From: Aaron Parecki Date: Tue, 18 Feb 2020 21:22:51 -0500 Subject: [PATCH] support domains with no path with Test fetching create a file `_` to serve a url like `http://example.com` --- src/p3k/HTTP/Test.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/p3k/HTTP/Test.php b/src/p3k/HTTP/Test.php index 1e09289..43cb46a 100644 --- a/src/p3k/HTTP/Test.php +++ b/src/p3k/HTTP/Test.php @@ -58,6 +58,8 @@ class Test implements Transport { $parts = parse_url($url); if($parts['path']) { $parts['path'] = '/'.str_replace('/','_',substr($parts['path'],1)); + if($parts['path'] == '/') + $parts['path'] = '/_'; $filepathurl = self::_build_url($parts); }