Set a variable to be transmitted as a name/value pair in the header of the HTTP response. With suitable JavaScript in the response page or article, this variable can influence what is displayed. This allows a page that is otherwise fixed, to have different manifestations to different users. Normally, the only way to do this is by having the page generated each time it is requested. A fixed content page or article can be pre-zipped so is quicker to serve and consumes less bandwidth.

Return TypeFunction nameArguments
hzEcodehzHttpEvent::SetHdr(hzString&,hzString&,)

Declared in file: hzHttpServer.h
Defined in file : hzHttpServer.cpp

Function Logic:

0:START 1:unknown 2:Return E_ARGUMENT 3:unknown 4:Return E_NODATA 5:p p items 6:Return E_OK

Function body:

hzEcode hzHttpEvent::SetHdr (hzString& name)hzString& value, 
{
   //  Set a variable to be transmitted as a name/value pair in the header of the HTTP response. With suitable JavaScript in the response page or article, this
   //  variable can influence what is displayed.
   //  
   //  This allows a page that is otherwise fixed, to have different manifestations to different users. Normally, the only way to do this is by having the page
   //  generated each time it is requested. A fixed content page or article can be pre-zipped so is quicker to serve and consumes less bandwidth.
   //  
   //  Arguments: 1) name The header parameter name.
   //     2) value The header parameter value.
   //  
   //  Returns: E_ARGUMENT If provided with blank variable name.
   //     E_NODATA If no value is supplied..
   //     E_OK  If operation successful.
   _hzfunc("hzHttpEvent::SetHdr") ;
   hzPair  p ;     //  Header name/value pair
   if (!name)
       return E_ARGUMENT ;
   if (!value)
       return E_NODATA ;
   p.name = name ;
   p.value = value ;
   m_HdrsResponse.Add(p) ;
   return E_OK ;
}