Return TypeFunction nameArguments
hzEcodehzHttpEvent::SendHttpHead(const hzString&,hzMimetype,unsigned int,)

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

Function Logic:

0:START 1:!fixContent 2:Return E_NODATA 3:hzString::Length hzHttpEvent::_formhead rc 4:rc!=E_OK 5:hzIpConnex::CliSocket 6:Return rc 7:m_pCx->SendData(Z)!=E_OK 8:hzIpConnex::CliSocket 9:Return E_WRITEFAIL 10:Return rc

Function body:

hzEcode hzHttpEvent::SendHttpHead (const hzString& fixContent, hzMimetype type, unsigned int nExpires)
{
   _hzfunc("hzHttpEvent::SendHttpHead(str)") ;
   hzChain Z ;
   hzEcode rc ;
   if (!fixContent)
       return E_NODATA ;
   rc = _formhead(Z, HTTPMSG_OK, type, fixContent.Length(), nExpires, false) ;
   if (rc != E_OK)
   {
       hzerr(rc, "Could not formulate HTTP header (sock=%d)", m_pCx->CliSocket()) ;
       return rc ;
   }
   if (m_pCx->SendData(Z) != E_OK)
   {
       hzerr(E_WRITEFAIL, "hzHttpEvent %p Failed to send response to browser (sock=%d)", this, m_pCx->CliSocket()) ;
       return E_WRITEFAIL ;
   }
   return rc ;
}