1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-23 15:22:41 +01:00

Respect query string when redirecting from missing trailing /

Test Plan: /differential/filter/active/jakubv?status=all

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, epriestley

Differential Revision: https://secure.phabricator.com/D1798
This commit is contained in:
vrana 2012-03-06 15:52:22 -08:00
parent b571f0b229
commit 95eb3bcf09

View file

@ -1,7 +1,7 @@
<?php <?php
/* /*
* Copyright 2011 Facebook, Inc. * Copyright 2012 Facebook, Inc.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -62,7 +62,8 @@ abstract class AphrontApplicationConfiguration {
// to add a trailing slash and issue a redirect if that resolves. // to add a trailing slash and issue a redirect if that resolves.
list($controller_class, $uri_data) = $mapper->mapPath($path.'/'); list($controller_class, $uri_data) = $mapper->mapPath($path.'/');
if ($controller_class) { if ($controller_class) {
return $this->buildRedirectController($path.'/'); $uri = $request->getRequestURI()->setPath($path.'/');
return $this->buildRedirectController($uri);
} }
} }