Article ID: 152968
Article Last Modified on 11/21/2006
#if (_MFC_VER == 0x0410)
virtual int CallFunction(CHttpServerContext* pCtxt,
LPTSTR pszQuery, LPTSTR pszCommand);
#endif
and the following code to the .CPP file for the class:
#if (_MFC_VER == 0x0410)
// Replace CMyServerExtension with the name of your
// CHttpServer derived class.
int CMyServerExtension::CallFunction(CHttpServerContext* pCtxt,
LPTSTR pszQuery, LPTSTR pszCommand)
{
DWORD dw = 100;
char clen[100];
BOOL bRet = pCtxt->GetServerVariable("CONTENT_LENGTH", clen, &dw);
if (bRet)
{
long len = atoi(clen);
*(pszQuery + len) = '\0';
}
return CHttpServer::CallFunction(pCtxt, pszQuery, pszCommand);
}
#endif
The CONTENT_LENGTH server variable contains the correct length of the data
sent from an HTML form. This function uses that length to remove the extra
characters appended at the end before parameters are extracted.
Additional query words: ISAPI POST carriage return line feed
Keywords: kbbug kbcode kbfix kbvc420fix KB152968