• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Trouble retrieving client IP address in WO 5.2 more info
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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 16:22:14 -0800

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.

  • Follow-Ups:
    • Re: Trouble retrieving client IP address in WO 5.2 more info
      • From: Chuck Hill <email@hidden>
References: 
 >Re: Trouble retrieving client IP address in WO 5.2 more info (From: Chuck Hill <email@hidden>)

  • Prev by Date: Re: Trouble retrieving client IP address in WO 5.2 more info
  • Next by Date: Testing D2J
  • Previous by thread: Re: Trouble retrieving client IP address in WO 5.2 more info
  • Next by thread: Re: Trouble retrieving client IP address in WO 5.2 more info
  • Index(es):
    • Date
    • Thread