David Zülke wrote:
> Am 02.04.2007 um 14:16 schrieb Daniel Swarbrick:
> 
>> 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".

Soooo.... the issue is mod_rewrite? The exact same server configuration 
that used to work perfectly with previous versions of Agavi?!??

David, Agavi is a great piece of software, but have you tried deploying 
it in real world scenarios? I respect you trying to stick to RFC's down 
to the letter, but maybe you could throw it open for developer 
discussion first, and find out if it's going to adversely affect 
existing deployments?

What if I want to change the port my webserver runs on? Shouldn't it 
just be a case of editing my apache config? Why should I have to change 
my config files in my web app? I don't know of any other framework that 
forces the user to do this.

I'm curious why mod_rewrite is nuking the SERVER_PORT. Obviously, if 
there is any way Agavi can automatically ascertain the server port, this 
information is going to have to be correct...

/baffled

> 
> 
>> 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


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

Reply via email to