Permalink
Browse files

Fix redirect method due to a mistake removing backslashes

The problem is that if 'flight.base_url' setting is set to 'http://localhost/flight', then:
$url = 'http:/localhost/flight';
Notice that one backslash has been removed.
  • Loading branch information...
1 parent c3c6f68 commit a0d749276fc780cf2713650b512ef38d8752c483 @yassineaddi yassineaddi committed on GitHub Nov 20, 2016
Showing with 1 addition and 1 deletion.
  1. +1 −1 flight/Engine.php
View
@@ -430,7 +430,7 @@ public function _redirect($url, $code = 303) {
// Append base url to redirect url
if ($base != '/' && strpos($url, '://') === false) {
- $url = preg_replace('#/+#', '/', $base.'/'.$url);
+ $url = $base . preg_replace('#/+#', '/', '/' . $url);
}
$this->response(false)

0 comments on commit a0d7492

Please sign in to comment.