Skip to content

Commit 663e7d0

Browse files
committed
fixed urlencode #200
1 parent 0b30c3d commit 663e7d0

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/Http/Url.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ public function getPath()
305305
$path = !empty($this->info['path']) ? '/'.implode('/', array_map('urlencode', $this->info['path'])).'/' : '/';
306306

307307
if (isset($this->info['file'])) {
308-
$path .= $this->info['file'];
308+
$path .= urlencode($this->info['file']);
309309

310310
if (isset($this->info['extension'])) {
311311
$path .= '.'.$this->info['extension'];

tests/UriTest.php renamed to tests/UrlTest.php

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ public function urlsParserProvider()
2323
['http://[email protected]:8083/tests/identified.html', 'http://[email protected]:8083/tests/identified.html'],
2424
['http://testuser:[email protected]:8083/tests/authenticated.html', 'http://testuser:[email protected]:8083/tests/authenticated.html'],
2525
['http://testuser:[email protected]:8083/tests/authenticated.html', 'http://testuser:[email protected]:8083/tests/authenticated.html'],
26+
['http://www.innherred.no/kultur/2017/03/25/On-the-road-med-%C3%86-og-Hagen-14499028.ece', 'http://www.innherred.no/kultur/2017/03/25/On-the-road-med-%C3%86-og-Hagen-14499028.ece'],
2627
];
2728
}
2829

0 commit comments

Comments
 (0)