Permalink
Browse files

MINOR Keep X-ControllerURL canonical by not re-constructing with ques…

…tion mark if there's no GET string (caused duplicate HTML5 pushState requests)
  • Loading branch information...
1 parent af80ab5 commit 0414e42bbce51e721922f1dd7e658c7459f3bcda @chillu chillu committed Mar 30, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 admin/code/LeftAndMain.php
@@ -332,7 +332,7 @@ function handleRequest(SS_HTTPRequest $request, DataModel $model = null) {
$url = $request->getURL();
if($getVars = $request->getVars()) {
if(isset($getVars['url'])) unset($getVars['url']);
- $url = Controller::join_links($url, '?' . http_build_query($getVars));
+ $url = Controller::join_links($url, $getVars ? '?' . http_build_query($getVars) : '');
}
$response->addHeader('X-ControllerURL', $url);
}

0 comments on commit 0414e42

Please sign in to comment.