本文整理汇总了C++中PHTTP_BMO_REQ_OBJECT::DelStartLine方法的典型用法代码示例。如果您正苦于以下问题:C++ PHTTP_BMO_REQ_OBJECT::DelStartLine方法的具体用法?C++ PHTTP_BMO_REQ_OBJECT::DelStartLine怎么用?C++ PHTTP_BMO_REQ_OBJECT::DelStartLine使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PHTTP_BMO_REQ_OBJECT
的用法示例。
在下文中一共展示了PHTTP_BMO_REQ_OBJECT::DelStartLine方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: AnscBdoGetBlockSize
ANSC_STATUS
HttpBmoReqParseStartLine
(
ANSC_HANDLE hThisObject
)
{
ANSC_STATUS returnStatus = ANSC_STATUS_SUCCESS;
PHTTP_BMO_REQ_OBJECT pMyObject = (PHTTP_BMO_REQ_OBJECT )hThisObject;
PHTTP_HFP_INTERFACE pHfpIf = (PHTTP_HFP_INTERFACE )pMyObject->hHfpIf;
PANSC_BUFFER_DESCRIPTOR pHeaderBdo = (PANSC_BUFFER_DESCRIPTOR)pMyObject->hHeaderBdo;
PHTTP_REQUEST_INFO pReqInfo = (PHTTP_REQUEST_INFO )pMyObject->hReqInfo;
PVOID pHeaderBuffer = NULL;
ULONG ulBufferSize = 0;
char* pHfStart = NULL;
ULONG ulSkipSize = 0;
char* pRawHfLine = NULL;
char* pStdHfLine = (char*)pMyObject->ScratchPad1;
ULONG ulRawLineSize = 0;
ULONG ulStdLineSize = 0;
pMyObject->DelStartLine((ANSC_HANDLE)pMyObject);
if ( !pHeaderBdo )
{
return ANSC_STATUS_UNAPPLICABLE;
}
else
{
pHeaderBuffer = AnscBdoGetBlock (pHeaderBdo);
ulBufferSize = AnscBdoGetBlockSize(pHeaderBdo);
}
AnscHttpFindHfStart(pHeaderBuffer, ulBufferSize, pHfStart);
if ( !pHfStart )
{
return ANSC_STATUS_UNAPPLICABLE;
}
else
{
ulSkipSize = (ULONG)pHfStart - (ULONG)pHeaderBuffer;
ulBufferSize -= ulSkipSize;
pRawHfLine = pHfStart;
}
AnscHttpGetHfLineSize(pRawHfLine, ulBufferSize, ulRawLineSize);
if ( ulRawLineSize <= pMyObject->PadSize1 )
{
AnscHttpPrepareHeader(pRawHfLine, ulRawLineSize, pStdHfLine, ulStdLineSize);
pStdHfLine[ulStdLineSize + 0] = HTTP_CARRIAGE_RETURN;
pStdHfLine[ulStdLineSize + 1] = HTTP_LINE_FEED;
pReqInfo =
(PHTTP_REQUEST_INFO)pHfpIf->ParseRequestLine
(
pHfpIf->hOwnerContext,
pStdHfLine,
ulStdLineSize
);
}
else
{
pReqInfo = NULL;
}
if ( !pReqInfo )
{
return ANSC_STATUS_BAD_PAYLOAD;
}
else
{
pMyObject->hReqInfo = (ANSC_HANDLE)pReqInfo;
}
return ANSC_STATUS_SUCCESS;
}