Here is the code to use to retrieve the current URL in a controller.
Example with a news detail page :
<?php
public function newsDetailAction($slug)
{
$request = $this->getRequest();
$currentRoute = $request->attributes->get('_route');
$currentUrl = $this->get('router')->generate($currentRoute, array('slug' => $slug), true);
}