Skip to content

Commit

Permalink
[HttpKernel] Log query string as well as path in Cache debug headers
Browse files Browse the repository at this point in the history
  • Loading branch information
Seldaek authored and fabpot committed Dec 8, 2010
1 parent f6bc712 commit beecd1f
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/Symfony/Component/HttpKernel/Cache/Cache.php
Expand Up @@ -138,7 +138,11 @@ public function handle(Request $request, $type = HttpKernelInterface::MASTER_REQ
$this->request = $request;
}

$this->traces[$request->getMethod().' '.$request->getPathInfo()] = array();
$path = $request->getPathInfo();
if ($qs = $request->getQueryString()) {
$path .= '?'.$qs;
}
$this->traces[$request->getMethod().' '.$path] = array();

if (!$request->isMethodSafe($request)) {
$response = $this->invalidate($request);
Expand Down Expand Up @@ -569,6 +573,10 @@ protected function isPrivateRequest(Request $request)
*/
protected function record(Request $request, $event)
{
$this->traces[$request->getMethod().' '.$request->getPathInfo()][] = $event;
$path = $request->getPathInfo();
if ($qs = $request->getQueryString()) {
$path .= '?'.$qs;
}
$this->traces[$request->getMethod().' '.$path][] = $event;
}
}

0 comments on commit beecd1f

Please sign in to comment.