jase jennings
August 14th, 2001, 08:22 AM
Hi,
I am looking through some ASP and trying to determine where an item of data is coming from.
There is a stock ASP object called 'Request', which has a collection called 'Server.Variables'. Ihave take a look on MSDN at a list of predefined variables that apply, yet the one i am looking for is NOT in the predefined list and taking a search through all my .asp and .js pages fails to show where it is being defined.
I am trying to determine where the variable HTTP_HOST comes from. This is how it looks in my asp pages ...
Session("DLAM").HostPath = "http://" & Request.ServerVariables("HTTP_HOST") & "/oasis/uk/images/"
Now, HTTP_HOST returns the name of the server upon which IIS is running, but HOW does it get set ? Where does the value come from ?
MSDN states ...
HTTP_<HeaderName> The value stored in the header HeaderName. Any header other than those listed in this table must be prefixed by HTTP_ in order for the ServerVariables collection to retrieve its value.
Note The server interprets any underscore (_) characters in HeaderName as dashes in the actual header. For example if you specify HTTP_MY_HEADER, the server searches for a header sent as MY-HEADER.
... but i do not understand what it means when it talks about 'headers'. Can somebody please help me determine where I might find where HTTP_HOST is being set ? Have you come across it before ? If it's NOT a stock variable then erhaps you could give me some pointers on how these headers work and how asp determines what HOST is, because it is never 'Set' in the code!
Thanks for your help, sorry for the long post.
Jase
<no witty trailer supplied>
I am looking through some ASP and trying to determine where an item of data is coming from.
There is a stock ASP object called 'Request', which has a collection called 'Server.Variables'. Ihave take a look on MSDN at a list of predefined variables that apply, yet the one i am looking for is NOT in the predefined list and taking a search through all my .asp and .js pages fails to show where it is being defined.
I am trying to determine where the variable HTTP_HOST comes from. This is how it looks in my asp pages ...
Session("DLAM").HostPath = "http://" & Request.ServerVariables("HTTP_HOST") & "/oasis/uk/images/"
Now, HTTP_HOST returns the name of the server upon which IIS is running, but HOW does it get set ? Where does the value come from ?
MSDN states ...
HTTP_<HeaderName> The value stored in the header HeaderName. Any header other than those listed in this table must be prefixed by HTTP_ in order for the ServerVariables collection to retrieve its value.
Note The server interprets any underscore (_) characters in HeaderName as dashes in the actual header. For example if you specify HTTP_MY_HEADER, the server searches for a header sent as MY-HEADER.
... but i do not understand what it means when it talks about 'headers'. Can somebody please help me determine where I might find where HTTP_HOST is being set ? Have you come across it before ? If it's NOT a stock variable then erhaps you could give me some pointers on how these headers work and how asp determines what HOST is, because it is never 'Set' in the code!
Thanks for your help, sorry for the long post.
Jase
<no witty trailer supplied>