Return Type | Function name | Arguments |
---|---|---|
hzEcode | hzHttpEvent::SendHttpHead | (const hzString&,hzMimetype,unsigned int,) |
Declared in file: hzHttpServer.h
Defined in file : hzHttpServer.cpp
Function Logic:
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 ; }