Skip to content

Commit

Permalink
[WebProfiler] Normalize header name and use a single reference
Browse files Browse the repository at this point in the history
  • Loading branch information
vicb authored and fabpot committed Jan 11, 2011
1 parent 0bc6d81 commit 40dac23
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ public function handle(Event $event, Response $response)

if ($response->headers->has('X-Debug-Token') && $response->isRedirect() && $this->interceptRedirects) {
$response->setContent(
sprintf('<html><head></head><body><h1>This Request redirects to<br /><a href="%s">%s</a>.</h1><h4>The redirect was intercepted by the web debug toolbar to help debugging.<br/>For more information, see the "intercept-redirects" option of the Profiler.</h4></body></html>',
$response->headers->get('location'), $response->headers->get('location'))
sprintf('<html><head></head><body><h1>This Request redirects to<br /><a href="%1$s">%1$s</a>.</h1><h4>The redirect was intercepted by the web debug toolbar to help debugging.<br/>For more information, see the "intercept-redirects" option of the Profiler.</h4></body></html>',
$response->headers->get('Location'))
);
$response->setStatusCode(200);
$response->headers->remove('Location');
Expand Down

0 comments on commit 40dac23

Please sign in to comment.