Re: Trouble retrieving client IP address in WO 5.2 more info
Re: Trouble retrieving client IP address in WO 5.2 more info
- Subject: Re: Trouble retrieving client IP address in WO 5.2 more info
- From: mjew <email@hidden>
- Date: Tue, 14 Jan 2003 19:00:45 -0800
Chuck,
Thanks for the tip. I have already visited the site, downloaded and
installed their latest Apache mod adaptor.
It doesn't seem to fix the problem, although I did notice that the
list of headerkeys passed in is different.
I've sent in a bug report to apple. I'll either take a gander at
the source code myself (not expecting much success, though), and
unless there is an obvious fix, I'll have to use a NetCloak
cookie hack for now.
I appreciate your time and assistance.
- Matthew
On 1/14/03 4:42 PM, "Chuck Hill" <email@hidden> wrote:
> Take a look at project Wonder. They have some patched adaptors. I don't know
> if they need to be (or have been) updated for 5.2. One of the patches for the
> Apache adaptor passes along all of the headers. I use this to avoid a similar
> problem. It might help you as well.
>
>
> Chuck
>
>
> mjew wrote:
>
>> Chuck,
>>
>> Thanks for the quick response.
>>
>> I am using the Apache adaptor shipped with 5.2
>>
>> I did more research, and am currently inserting a
>> hKeys = context().request().headerKeys();
>>
>> into my page and having it display ALL the headerKeys.
>>
>> I have found the following headerkeys of potential interest:
>> remote_host
>> remote_port
>> remote_addr
>>
>> The only "x-webobjects" headers being passed to me are:
>> x-webobjects-request-id
>> x-webobjects-request-method
>> x-webobjects-adaptor-version
>>
>> I modified the code to use "remote_host" and "remote_addr"
>> in two test fields, put it on the deployment/application
>> server, and I *still* am getting nothing but empty strings.
>>
>> I'm afraid I'll have to resort to having NetCloak stuff the client IP
>> as a cookie value when the person initially arrives. Sigh.
>>
>> - Matthew
>>
>> On 1/14/03 4:11 PM, "Chuck Hill" <email@hidden> wrote:
>>
>>
>>> To make things more intriguing for developers of WebObjects, earlier
>>> developers
>>> of the different adaptors named headers differently. This might have
>>> changed
>>> in
>>> 5.2, check and see if it is there under a different name. Also, not all
>>> adaptors pass all the headers. I'd thought this was supposed to be fixed in
>>> 5.2, but I've not checked. Which adaptor are you using?
>>>
>>>
>>> Chuck
>>>
>>>
>>> mjew wrote:
>>>
>>>
>>>> One more piece of follow-up info regarding retrieving the client IP address
>>>> in a WO 5.2 app via the call:
>>>>
>>>> clientIP = context().request().headerForKey("x-webobjects-remote-addr");
>>>>
>>>> My current deployment is a split install (meaning that the web server
>>>> is NOT the application server). I'm wondering if this could have something
>>>> to do with it.
>>>>
>>>> But it would be quite lame if using a split installation disabled access to
>>>> those header fields, since split installs are the recommended method for
>>>> scaling WebObjects applications across multiple servers for performance
>>>> and high availability.
>>>>
>>>> Does anyone have any information about this?
>>>>
>>>> - Matthew
>>>> _______________________________________________
>>>> webobjects-dev mailing list | email@hidden
>>>> Help/Unsubscribe/Archives:
>>>> http://www.lists.apple.com/mailman/listinfo/webobjects-dev
>>>> Do not post admin requests to the list. They will be ignored.
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.