Update of /cvsroot/pywin32/pywin32/isapi/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5446
Modified Files:
ControlBlock.h PyExtensionObjects.cpp PyExtensionObjects.h
Log Message:
Add EXTENSION_CONTROL_BLOCK.IsKeepConn() and autoduck corrections.
Index: ControlBlock.h
===================================================================
RCS file: /cvsroot/pywin32/pywin32/isapi/src/ControlBlock.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** ControlBlock.h 12 Oct 2006 07:00:37 -0000 1.3
--- ControlBlock.h 4 Jan 2007 08:19:59 -0000 1.4
***************
*** 132,135 ****
--- 132,143 ----
}
+ BOOL IsKeepConn(LPBOOL bIs)
+ {
+ BOOL bOK = (m_pECB->ServerSupportFunction)(m_pECB->ConnID,
+ HSE_REQ_IS_KEEP_CONN,
+ (void *)bIs, 0,0);
+ return bOK;
+ }
+
bool IsKeepAlive(void)
{
Index: PyExtensionObjects.h
===================================================================
RCS file: /cvsroot/pywin32/pywin32/isapi/src/PyExtensionObjects.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** PyExtensionObjects.h 12 Oct 2006 07:00:37 -0000 1.2
--- PyExtensionObjects.h 4 Jan 2007 08:19:59 -0000 1.3
***************
*** 95,98 ****
--- 95,99 ----
static PyObject * TransmitFile(PyObject *self, PyObject * args); // HSE_REQ_TRANSMIT_FILE
static PyObject * MapURLToPath(PyObject *self, PyObject * args); // HSE_REQ_MAP_URL_TO_PATH
+ static PyObject * IsKeepConn(PyObject *self, PyObject * args); // HSE_REQ_IS_KEEP_CONN
static PyObject * IsSessionActive(PyObject *self, PyObject * args);
Index: PyExtensionObjects.cpp
===================================================================
RCS file: /cvsroot/pywin32/pywin32/isapi/src/PyExtensionObjects.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** PyExtensionObjects.cpp 14 Dec 2006 08:35:34 -0000 1.5
--- PyExtensionObjects.cpp 4 Jan 2007 08:19:59 -0000 1.6
***************
*** 157,160 ****
--- 157,161 ----
{"IsKeepAlive", PyECB::IsKeepAlive,1}, // @pymeth IsKeepAlive|
{"GetImpersonationToken", PyECB::GetImpersonationToken, 1}, // @pymeth GetImpersonationToken|
+ {"IsKeepConn", PyECB::IsKeepConn, 1}, // @pymeth IsKeepConn|Calls ServerSupportFunction with HSE_REQ_IS_KEEP_CONN
{NULL}
};
***************
*** 522,525 ****
--- 523,543 ----
}
+ // @pymethod int|EXTENSION_CONTROL_BLOCK|IsKeepConn|Calls ServerSupportFunction with HSE_REQ_IS_KEEP_CONN
+ PyObject * PyECB::IsKeepConn(PyObject *self, PyObject *args)
+ {
+ if (!PyArg_ParseTuple(args, ":IsKeepConn"))
+ return NULL;
+
+ PyECB * pecb = (PyECB *) self;
+ BOOL bRes, bIs;
+ Py_BEGIN_ALLOW_THREADS
+ bRes = pecb->m_pcb->IsKeepConn(&bIs);
+ Py_END_ALLOW_THREADS
+ if (!bRes)
+ return SetPyECBError("IsKeepCon");
+ return PyBool_FromLong(bIs);
+ }
+
+
class PyTFD {
public:
***************
*** 578,582 ****
&obCallbackParam, // @pyparm object|param||Any object - passed as 2nd arg to callback.
&hFile, // @pyparm int|hFile||
! &info.pszStatusCode, // @pyparm string|statusCode|
&info.BytesToWrite, // @pyparm int|BytesToWrite||
&info.Offset, // @pyparm int|Offset||
--- 596,600 ----
&obCallbackParam, // @pyparm object|param||Any object - passed as 2nd arg to callback.
&hFile, // @pyparm int|hFile||
! &info.pszStatusCode, // @pyparm string|statusCode||
&info.BytesToWrite, // @pyparm int|BytesToWrite||
&info.Offset, // @pyparm int|Offset||
***************
*** 589,593 ****
return NULL;
info.hFile = (HANDLE)hFile;
! // @desc The callback is called with 4 args - (<o PyECB>, param, cbIO, dwErrCode)
if (!PyCallable_Check(obCallback))
--- 607,611 ----
return NULL;
info.hFile = (HANDLE)hFile;
! // @comm The callback is called with 4 args - (<o PyECB>, param, cbIO, dwErrCode)
if (!PyCallable_Check(obCallback))
***************
*** 617,620 ****
--- 635,640 ----
// @pymethod |EXTENSION_CONTROL_BLOCK|IsKeepAlive|
+ // @comm This method simply checks a HTTP_CONNECTION header for 'keep-alive',
+ // making it fairly useless. See <om EXTENSION_CONTROL_BLOCK.IsKeepCon>
PyObject * PyECB::IsKeepAlive(PyObject *self, PyObject * args)
{
|