本文整理汇总了C++中HttpReq::checkPathInfo方法的典型用法代码示例。如果您正苦于以下问题:C++ HttpReq::checkPathInfo方法的具体用法?C++ HttpReq::checkPathInfo怎么用?C++ HttpReq::checkPathInfo使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HttpReq
的用法示例。
在下文中一共展示了HttpReq::checkPathInfo方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: getSubstValue
//.........这里部分代码省略.........
{
case REF_STRING:
pValue = (char *)pItem->getStr()->c_str();
return pItem->getStr()->len();
case REF_MAP:
{
MapRefItem * pRef = pItem->getMapRef();
int len = 1024;
char achBuf[1024];
if ( buildString( pRef->getKeyFormat(), pConn, achBuf, len ) == NULL )
return 0;
if ( (len = pRef->getMap()->lookup( achBuf, len, pValue, bufLen )) == -1 )
{
if ( pRef->getDefaultFormat() )
{
if ( buildString( pRef->getDefaultFormat(), pConn,
pValue, bufLen ) == NULL )
return 0;
len = bufLen;
}
else
len = 0;
}
return len;
}
break;
case REF_RULE_SUBSTR:
return getSubstr( m_pSourceURL, m_ruleVec, m_ruleMatches, pItem->getIndex(),
pValue, m_flag & RULE_FLAG_BR_ESCAPE );
case REF_COND_SUBSTR:
return getSubstr( m_pCondBuf, m_condVec, m_condMatches, pItem->getIndex(),
pValue, m_flag & RULE_FLAG_BR_ESCAPE );
case REF_ENV:
pValue = (char *)RequestVars::getEnv( pConn, pItem->getStr()->c_str(),
pItem->getStr()->len(), i );
if ( !pValue )
{
i = 0;
}
return i;
case REF_HTTP_HEADER:
pValue = (char *)pReq->getHeader( pItem->getStr()->c_str(),
pItem->getStr()->len(), i );
if ( !pValue )
i = 0;
return i;
case REF_REQUST_FN:
case REF_SCRIPTFILENAME:
if ( m_iScriptLen == -1 )
{
pReq->checkPathInfo( m_pSourceURL, m_sourceURLLen, m_iFilePathLen,
m_iScriptLen, m_iPathInfoLen, m_pContext );
}
pValue = HttpGlobals::g_achBuf;
//if ( m_pStrip )
// return m_iFilePathLen;
//else
// return m_iFilePathLen + m_iPathInfoLen;
return m_iFilePathLen;
case REF_PATH_INFO:
if ( m_iScriptLen == -1 )
{
pReq->checkPathInfo( m_pSourceURL, m_sourceURLLen, m_iFilePathLen,
m_iScriptLen, m_iPathInfoLen, m_pContext );
}
pValue = &HttpGlobals::g_achBuf[ m_iFilePathLen ];
return m_iPathInfoLen;
case REF_SCRIPT_NAME:
if ( m_iScriptLen == -1 )
{
pReq->checkPathInfo( m_pSourceURL, m_sourceURLLen, m_iFilePathLen,
m_iScriptLen, m_iPathInfoLen, m_pContext );
}
pValue = (char *)pReq->getOrgReqURL();
return m_iScriptLen;
case REF_REQ_URI: //in rewrite rule, this does not include Query String part
if ( pReq->getRedirects() == 0 )
{
pValue = (char *)pReq->getOrgReqURL();
return pReq->getOrgReqURILen();
}
if ( m_pStrip )
{
memmove( pValue, m_pStrip->c_str(), m_pStrip->len() );
memmove( pValue + m_pStrip->len(), m_pSourceURL, m_sourceURLLen );
return m_pStrip->len() + m_sourceURLLen;
}
//fall through
case REF_CUR_URI:
pValue = (char *)m_pSourceURL;
return m_sourceURLLen;
case REF_QUERY_STRING:
pValue = (char *)m_pQS;
return m_qsLen;
default:
return RequestVars::getReqVar( pConn, type, pValue, bufLen );
}
return 0;
}