KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: HTTP GET HEADER and the host
PRODUCT: 4D | VERSION: 2004.6 | PLATFORM: Mac & Win
Published On: April 18, 2007

When using 4D Web Server and multiple DNS names for a single IP address it can be useful to differentiate between the host names rather than the host IP address (as the local variables in ON WEB CONNECTION do). The HTTP GET HEADER command can be used for this.

When used with two text array parameters the command returns an array of header elements and value elements. By searching the array of header elements for the desired value (in this case "Host") and then accessing the corresponding element of the value array the desired data can be retrieved.

For more information on the HTTP GET HEADER command check the online documentation:
https://www.4d.com/docs/CMU/CMU00697.HTM

For more information on HTTP headers in check the RFC documentation:
https://www.rfc-editor.org/rfc/rfc4229.txt