perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Geoffrey Young <>
Subject Re: [mp2] dropping $c->remote_host?
Date Wed, 18 Aug 2004 04:56:26 GMT

Stas Bekman wrote:
> The Apache docs say not to access directly $c->remote_host() but always
> call $c->get_remote_host. I see that mp1 had both with the suggestion
> not to use $c->remote_host(). I suggest that we drop $c->remote_host()
> but it's somewhat related to the earlier suggestion to make
> $c->remote_host settable, so I'm not sure what is the right thing to do.
> Comments?

I think I prefer to keep it and (possibly) make it writable.  the reason to
use ap_get_remote_host over c->remote_host is because ap_get_remote_host
respects UseCanonicalName settings from the config, allowing them to control
how deep trying to dig out the remote_host goes.  I think reading from
c->remote_host is not necessarily wrong (since it looks to get set so long
as ap_get_remote_host is called at all), but that it doesn't necessarily
contain consistent information from request to request.

on the other hand, I see writing to c->remote_host as being useful for
mocking up clients and such in that sneaky kind of way that mod_perl users
are famous for.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message