• 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
handle CGI Request - client address parameters - error and gotcha
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

handle CGI Request - client address parameters - error and gotcha


  • Subject: handle CGI Request - client address parameters - error and gotcha
  • From: email@hidden
  • Date: Thu, 14 Jun 2001 04:25:25 EDT

The dictionary entry for the handle CGI request of standard additions has an
error, and the behavior of the parameters involved may present a "gotcha" if
you don't know certain facts.

-- the error part ----
(9.1+1.5.5/1.6, but probably applies to earlier versions).

Here is the abbreviated Standard Additions dictionary entry...

handle CGI request: Sent to a script to process a Common Gateway Interface
request
handle CGI request string -- the path of the URL
[from address string] -- the IP address of the entity making the
request
[from client IP address string] -- the Internet address of the
client

It appears that the definitions are switched. "address" should be the
canonical name of the browsing computer, not the IP address, and "client IP
address" should be... well, you've got the point.

Chris Nebel - is there time to sneak the dictionary fix into macOS 9.2? TIA.

-- the "gotcha" part ---
When run thru Personal Web Sharing in classic, these are both set to the IP
address of the browsing computer. The canonical name is not delivered to the
CGI by PWS.

When run thru WebSTAR, the behavior varies depending on the setting of the
"Use DNS for server and client IP lookups" checkbox (found under Web Settings
--> Connections in WebSTAR Admin).

If "Use DNS..." is checked, "address" is delivered to the CGI as the
canonical name of the browsing computer.

If "Use DNS..." is unchecked, "address" arrives as the IP address of the
browsing computer.

This can cause problems when writing CGIs which use this info, especially
when moved to other servers where the setting may be different (or when an
administrator changes the settings without telling the CGI writer). Starnine
oops 4D recommends turning "Use DNS..." OFF for best speed, but it must be ON
if one uses canonical names in the allow/deny settings for realms, so either
setting is likely to be encountered.

I don't know how this might apply to other server software on the Mac. I hope
this info helps someone.

cc please, on digest

Jeff Baumann
email@hidden
www.linkedresources.com


  • Prev by Date: Question about "info for" command
  • Next by Date: Coercing Styled Text to Text
  • Previous by thread: Re: Question about "info for" command
  • Next by thread: Coercing Styled Text to Text
  • Index(es):
    • Date
    • Thread