Am 02.04.2007 um 08:22 schrieb Daniel Swarbrick:

> I'm running an https site on a non-standard port (9443), and trying to
> use setRedirect() in a view after a successful form submission,  
> like so:
>
> class Default_LoginSuccessView extends ProjectBaseView
> {
>    public function executeHtml(AgaviRequestDataHolder $rd)
>    {
>      $this->getContainer()->getResponse()->setRedirect(
>         $this->getContext()->getRouting()->gen('index'));
>    }
> }
>
> The gen('index') simply returns '/', as I'd expect, but the
> setRedirect(), or more accurately the  
> AgaviWebRequest::getUrlAuthority()
> doesn't seem to recognise that my virtual host is running on port  
> 9443.
>
> Am I missing something here?

Daniel,

you have to adjust Apache's ServerName setting, too - changing Listen  
alone is not enough.

$routing->getBaseHref() should return the URL without the port, too.  
This is an indication that there's something wrong with your  
webserver setup, and Agavi cannot determine the host. Check a phpinfo 
(), I'm pretty sure the port doesn't appear there either. Or are you  
using a proxy, load balancer, anything like that?


David

_______________________________________________
users mailing list
[email protected]
http://lists.agavi.org/mailman/listinfo/users

Reply via email to