How to specify the server name in HTTP headers |
|
Date Entered: 09/04/1997
|
Last Update: 06/07/2006
|
APPLIES TO |
|
|
|
|
SYNOPSIS |
I need to send along the server name in the HTTP request header. Some web servers these days allow you to do multi-homing on a single IP. The way the server distinguishes the difference is by looking in the HTTP request header for the server name. Can your control handle them? |
SOLUTION |
Yes. By default the HTTP control sends the Host header automatically.
Older versions of IP*Works! did not do this by default. You can simply add an extra header like below:
HTTP1.URL = ...
HTTP1.OtherHeaders = "Host: " + HTTP1.URLServer + chr$(13)+chr$(10)
|