• 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: Apache vars
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Apache vars


  • Subject: Re: Apache vars
  • From: Kaj Hejer <email@hidden>
  • Date: Fri, 14 Mar 2003 20:38:46 +0100

At 17:07 +0100 14-03-03, Riccardo De Menna wrote:
To all,
Where can I read the client IP address or, as an example, all the Apache tags like browser, referer etc.?
Is it something I should find in the Session class?


Hi!

No, but you can access them from the WORequest object, f.x.

context().request().headersForKey("referer")


WORequest extends WOMessage which has the following usefull methods:

---
headers

public NSDictionary headers()

    Returns an NSDictionary containing the WOMessage's HTTP headers.

Returns:
NSDictionary containing the WOMessage's HTTP headers.
---

headersForKey

public NSArray headersForKey(Object aKey)

    Returns all HTTP header field-values corresponding to the field-name aKey.

Parameters:
aKey - the HTTP header field-name of the headers to returnReturns:
all HTTP headers with field-name aKey
---

See <url:http://developer.apple.com/techpubs/webobjects/Reference/API/com/webobjects/appserver/WORequest.html> and <url:http://developer.apple.com/techpubs/webobjects/Reference/API/com/webobjects/appserver/WOMessage.html> for more info.



-Kaj :)
_______________________________________________
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.

References: 
 >Apache vars (From: Riccardo De Menna <email@hidden>)

  • Prev by Date: Re: Newbie: Non-direct to Java Application
  • Next by Date: Newbie FetchSpecification
  • Previous by thread: Apache vars
  • Next by thread: Newbie FetchSpecification
  • Index(es):
    • Date
    • Thread