Update of /cvsroot/pywin32/pywin32/isapi/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv461/isapi/src
Modified Files:
PyExtensionObjects.cpp PyExtensionObjects.h
Log Message:
Add extension ExecURLInfo() method.
Index: PyExtensionObjects.h
===================================================================
RCS file: /cvsroot/pywin32/pywin32/isapi/src/PyExtensionObjects.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** PyExtensionObjects.h 15 May 2008 10:57:09 -0000 1.5
--- PyExtensionObjects.h 29 Sep 2008 13:00:37 -0000 1.6
***************
*** 101,104 ****
--- 101,105 ----
static PyObject * IsKeepConn(PyObject *self, PyObject * args); // HSE_REQ_IS_KEEP_CONN
static PyObject * SetFlushFlag(PyObject *self, PyObject * args); // HSE_REQ_SET_FLUSH_FLAG
+ static PyObject * ExecURLInfo(PyObject *self, PyObject * args); // HSE_REQ_EXEC_URL
static PyObject * IsSessionActive(PyObject *self, PyObject * args);
Index: PyExtensionObjects.cpp
===================================================================
RCS file: /cvsroot/pywin32/pywin32/isapi/src/PyExtensionObjects.cpp,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** PyExtensionObjects.cpp 3 Jul 2008 13:30:04 -0000 1.9
--- PyExtensionObjects.cpp 29 Sep 2008 13:00:37 -0000 1.10
***************
*** 158,161 ****
--- 158,162 ----
{"GetImpersonationToken", PyECB::GetImpersonationToken, 1}, // @pymeth GetImpersonationToken|
{"IsKeepConn", PyECB::IsKeepConn, 1}, // @pymeth IsKeepConn|Calls ServerSupportFunction with HSE_REQ_IS_KEEP_CONN
+ {"ExecURLInfo", PyECB::ExecURLInfo, 1}, // @pymeth ExecURLInfo|Calls ServerSupportFunction with HSE_REQ_EXEC_URL
{NULL}
};
***************
*** 575,578 ****
--- 576,610 ----
}
+ // @pymethod int|EXTENSION_CONTROL_BLOCK|ExecURLInfo|Calls ServerSupportFunction with HSE_REQ_EXEC_URL
+ PyObject * PyECB::ExecURLInfo(PyObject *self, PyObject *args)
+ {
+ PyObject *obInfo, *obEntity;
+ HSE_EXEC_URL_INFO i;
+ if (!PyArg_ParseTuple(args, "zzzOOi:ExecURLInfo",
+ &i.pszUrl, // @pyparm string|url||
+ &i.pszMethod, // @pyparm string|method||
+ &i.pszChildHeaders, // @pyparm string|clientHeaders||
+ &obInfo, // @pyparm object|info||Must be None
+ &obEntity, // @pyparm object|entity||Must be None
+ &i.dwExecUrlFlags)) // @pyparm int|flags||
+ return NULL;
+
+ if (obInfo != Py_None || obEntity != Py_None)
+ return PyErr_Format(PyExc_ValueError, "info and entity params must be None");
+
+ i.pUserInfo = NULL;
+ i.pEntity = NULL;
+ PyECB * pecb = (PyECB *) self;
+ EXTENSION_CONTROL_BLOCK *ecb = pecb->m_pcb->GetECB();
+ if (!pecb || !pecb->Check()) return NULL;
+ BOOL bRes, bIs;
+ Py_BEGIN_ALLOW_THREADS
+ bRes = ecb->ServerSupportFunction(ecb->ConnID, HSE_REQ_EXEC_URL, &i, NULL,NULL);
+ Py_END_ALLOW_THREADS
+ if (!bRes)
+ return SetPyECBError("ServerSupportFunction(HSE_REQ_EXEC_URL)");
+ return PyBool_FromLong(bIs);
+ }
+
class PyTFD {
|