本文整理汇总了C++中HttpSession::getResp方法的典型用法代码示例。如果您正苦于以下问题:C++ HttpSession::getResp方法的具体用法?C++ HttpSession::getResp怎么用?C++ HttpSession::getResp使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HttpSession
的用法示例。
在下文中一共展示了HttpSession::getResp方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: HioChainStream
HttpSession *HttpSession::newSubSession(SubSessInfo_t *pSubSessInfo)
{
//for subsession, we intentionally turn off
// keepalive
// chunk
// gzip compression
// security
//detect loop subsessions
int depth = 1;
if (m_pParent)
{
depth = 1 + ((HioChainStream *)getStream())->getDepth();
if (depth > 9)
return NULL;
}
if (detectLoopSubSession(pSubSessInfo) == 1)
return NULL;
HttpSession *pSession = HttpSessionPool::getSession();
if (! pSession)
return NULL;
//pSession->setSsiRuntime( m_pSsiRuntime );
HioChainStream *pStream = new HioChainStream();
pStream->setHandler(pSession);
pSession->setStream(pStream);
pSession->getReq()->setILog(pStream);
pSession->m_pClientInfo = m_pClientInfo;
pSession->m_pSslConn = m_pSslConn;
pStream->setDepth(depth);
pSession->getReq()->setMethod(pSubSessInfo->m_method);
if (pSession->getReq()->clone(getReq(), pSubSessInfo))
{
pStream->setHandler(NULL);
delete pStream;
HttpSessionPool::recycle(pSession);
return NULL;
}
pSession->setFlag(HSF_SEC_CLEARED | HSF_SEC_RESP_CLEARED |
HSF_SUB_SESSION);
pSession->getResp()->reset();
#ifdef _ENTERPRISE_
pSession->getResp()->setCacheStore(getCacheStore());
#endif
LS_DBG_M(getLogSession(), "Create SUB SESSION: %d, flag: %d, "
"method: %s, URI: %s, len: %d, QS: %s, len: %d",
m_iSubReqSeq, pSubSessInfo->m_flag,
HttpMethod::get(pSubSessInfo->m_method),
pSubSessInfo->m_cacheKey.m_pUri,
pSubSessInfo->m_cacheKey.m_iUriLen,
pSubSessInfo->m_cacheKey.m_pQs ? pSubSessInfo->m_cacheKey.m_pQs : "",
pSubSessInfo->m_cacheKey.m_iQsLen);
HttpSession *parent = NULL;
if (pSubSessInfo->m_flag & SUB_REQ_DETACHED)
{
pStream->setParentSession(NULL);
//set Stream to black hole mode,
pStream->setFlag(HIO_FLAG_BLACK_HOLE, 1);
//parent = getBackGroundSession();
}
else
{
pStream->setSequence(m_iSubReqSeq++);
parent = this;
}
if (pSubSessInfo->m_flag & SUB_REQ_NOABORT)
pSession->setFlag(HSF_NO_ABORT, 1);
if (pSubSessInfo->m_flag & SUB_REQ_NOCACHE)
pSession->setFlag(HSF_NOCACHE, 1);
pSession->m_pParent = parent;
return pSession;
}