Anyone trying to get this to work from a proxy/redirect, having problems with function getURL
We edited phpcas/cas/client.php around line 2216 where
$final_uri .= strtok($_SERVER['REQUEST_URI'],"?");

we changed it to

$oldURL = $_SERVER['REQUEST_URI'];			
$newURL =  str_replace("/path/drupal","/your/new/proxy/path/drupal", $oldURL);
$final_uri .= strtok($newURL,"?");

Any other suggestion welcome, but this one worked for us.