• 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: request.headerForKey("pc-remote-addr");
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: request.headerForKey("pc-remote-addr");


  • Subject: Re: request.headerForKey("pc-remote-addr");
  • From: Chuck Hill <email@hidden>
  • Date: Sat, 3 Apr 2004 17:26:37 -0800

I've come to believe that the adaptor writers
(a) Hate each other and never speak
(b) Have a pathological fear of consistency
(c) Hate us

The names of headers vary by adaptor type, version, and maybe even platform. They've been an ongoing source of frustration over the years.

The only effective solution I've found is to use an array of candidate names, and check each until you find a non-null match.

Lame but true.

Chuck


On Apr 3, 2004, at 5:12 PM, Bill Reynolds wrote:

A recent OS upgrade to my OSX Server 'seems' to have broken some code.

I was using "ip_address = request.headerForKey("http_pc_remote_addr");" as
part of a security process when first creating a session.


I suddenly stopped acquiring the users ip address after an upgrade. It
turned out that the key went from "http_pc_remote_addr" to now being
"pc-remote-addr". Changing my code wasn't difficult, but I'm concerned what
other changes to the application server software, web server (or whatever
got updated in the Auto-Update process) might secretly be breaking my code.


My question is really this; are header 'keys' consistent? Can I safely bank
on "pc-remote-addr" being there till death do me part?


-Bill Reynolds
_______________________________________________
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:
    • FW: request.headerForKey("pc-remote-addr");
      • From: Bill Reynolds <email@hidden>
    • Re: request.headerForKey("pc-remote-addr");
      • From: Anjo Krank <email@hidden>
References: 
 >request.headerForKey("pc-remote-addr"); (From: Bill Reynolds <email@hidden>)

  • Prev by Date: request.headerForKey("pc-remote-addr");
  • Next by Date: Re: request.headerForKey("pc-remote-addr");
  • Previous by thread: request.headerForKey("pc-remote-addr");
  • Next by thread: Re: request.headerForKey("pc-remote-addr");
  • Index(es):
    • Date
    • Thread