Am 02.04.2007 um 14:16 schrieb Daniel Swarbrick: >> $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? > > No proxy, no load balancer. Direct TCP connects. > > phpinfo() on the same virtual host correctly shows the port. > Mod_rewrite > may be having something to do with it, since when I print_r($_SERVER) > from index.php with the .htaccess enabling mod_rewrite, the > SERVER_PORT > seems to have been clobbered.
See, there is your issue! You can give: <parameter name="sources"> <parameter name="SERVER_PORT">REDIRECT_SERVER_PORT</parameter> </parameter> to the <request> factory definition to override the source Agavi reads such information from. Possible are "HTTPS", "REQUEST_METHOD", "SERVER_NAME" and "SERVER_PORT". > The fact remains though that Agavi used to simply send an absolute URL > in the Location header, as opposed to a full URL including protocol > now > - ie, it seems unable to recognise that I'm doing a redirect to a > generated route in my own app. > > I'm either overlooking something really fundamental here, or something > has changed radically in Agavi. Location: /, i.e. without an _absolute_ URI that includes the protocol, server name and host, is against the HTTP specification. That's why Agavi now prepends that information to a relative URL. The problem is on your side, since the SERVER_PORT information gets lost. Use the fix described above to eliminate the issue. David _______________________________________________ users mailing list [email protected] http://lists.agavi.org/mailman/listinfo/users
