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: Chuck Hill <email@hidden>
- Date: Tue, 14 Jan 2003 16:42:07 -0800
- Organization: Global Village Consulting, Inc.
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.
--
Chuck Hill - Village Idiot email@hidden
Global Village Consulting Inc. http://www.global-village.net
_______________________________________________
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.