Page MenuHomePhabricator

D19190.id45961.diff
No OneTemporary

D19190.id45961.diff

diff --git a/src/applications/diffusion/controller/DiffusionController.php b/src/applications/diffusion/controller/DiffusionController.php
--- a/src/applications/diffusion/controller/DiffusionController.php
+++ b/src/applications/diffusion/controller/DiffusionController.php
@@ -69,13 +69,18 @@
// repository has a different canonical path like "/diffusion/XYZ/...",
// redirect them to the canonical path.
- $request_path = $request->getPath();
- $repository = $drequest->getRepository();
+ // Skip this redirect if the request is an AJAX request, like the requests
+ // that Owners makes to complete and validate paths.
+
+ if (!$request->isAjax()) {
+ $request_path = $request->getPath();
+ $repository = $drequest->getRepository();
- $canonical_path = $repository->getCanonicalPath($request_path);
- if ($canonical_path !== null) {
- if ($canonical_path != $request_path) {
- return id(new AphrontRedirectResponse())->setURI($canonical_path);
+ $canonical_path = $repository->getCanonicalPath($request_path);
+ if ($canonical_path !== null) {
+ if ($canonical_path != $request_path) {
+ return id(new AphrontRedirectResponse())->setURI($canonical_path);
+ }
}
}

File Metadata

Mime Type
text/plain
Expires
Sun, Mar 9, 2:17 AM (2 w, 4 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7385772
Default Alt Text
D19190.id45961.diff (1 KB)

Event Timeline