Release Date: Tuesday, October 14, 1997
Expires no later than: December 31, 1997
Important: THIS DOCUMENTATION IS INCOMPLETE AND PROBABLY A BIT INACCURATE
It is subject to change as the API matures.
Feedback and contributions are encouraged:
These are general purpose World Wide Web cgi/plug-in utilities which are not dependent
on the CGI API.
Boolean CGIIsSecurePath ( char *thePathString )
Test a given path string to ensure it won't try to 'jump' levels.
void CGIDecodeURLChars ( char *theString, Boolean skipControlChars )
replaces instances of percent signs (%) followed by an ASCII char value with the actual character.
Boolean CGICharWillHex ( unsigned char theChar )
Returns true if theChar will be converted to hex when encoding as an URL string.
void CGICharToHex ( unsigned char theChar, char *theString )
Converts theChar to percent-hex encoding for URLs, and writes that to theString.
void CGIPathToMacPath ( char *ioPathString )
convert a '/' delimited path to a ':' delimited one, and make sure there's one ':' at the start if the path includes folders.
CGIErr DateToGMTString ( UInt32 theDate, char *theDateString )
theDate - must be a Macintosh date value in the current time zone, e.g., as returned by GetDateTime.
theDateString - must be at least 30 bytes long (HTTP_DATE_STRING_LENGTH + 1)
UInt32 DateGetDaysFromNow ( UInt16 daysToAdd )
Returns a Mac toolbox format date (time in seconds since midnight, January 1, 1904) plus the specified number of days.
CGIErr URLGetServerAddress ( char *theURL, char **theServer, UInt16 *theServerLength )
Get a pointer to the server address within an URL.
Important: Do not attempt to deallocate theServer. Do not reference theServer once theURL has been deallocated (or moved).