summaryrefslogtreecommitdiff
path: root/sapi/isapi/php4isapi.c
diff options
context:
space:
mode:
authorShane Caraveo <shane@php.net>2001-01-07 23:45:24 +0000
committerShane Caraveo <shane@php.net>2001-01-07 23:45:24 +0000
commitf1afd6f487381a5adcf684028a29c76795818bed (patch)
tree1195971bc48679807bd84e1b1f3917b5369d2d2b /sapi/isapi/php4isapi.c
parent7e79846d1001d1b6b9226249b266c61a69241a16 (diff)
downloadphp-git-f1afd6f487381a5adcf684028a29c76795818bed.tar.gz
define flag to turn off exception handling
Diffstat (limited to 'sapi/isapi/php4isapi.c')
-rw-r--r--sapi/isapi/php4isapi.c23
1 files changed, 21 insertions, 2 deletions
diff --git a/sapi/isapi/php4isapi.c b/sapi/isapi/php4isapi.c
index 03748e24ed..65b5ec9b4d 100644
--- a/sapi/isapi/php4isapi.c
+++ b/sapi/isapi/php4isapi.c
@@ -43,6 +43,16 @@
# define GetLastError() errno
#endif
+/*
+uncomment the following lines to turn off
+exception trapping when running under a debugger
+
+
+#ifdef _DEBUG
+#define NO_EXCEPTION_HANDLERS
+#endif
+*/
+
#define MAX_STATUS_LENGTH sizeof("xxxx LONGEST STATUS DESCRIPTION")
#define ISAPI_SERVER_VAR_BUF_SIZE 1024
#define ISAPI_POST_DATA_BUF 1024
@@ -426,7 +436,10 @@ static void sapi_isapi_register_server_variables(zval *track_vars_array ELS_DC S
/* Register SSL ISAPI variables */
sapi_isapi_register_server_variables2(isapi_secure_server_variable_names, lpECB, track_vars_array, NULL ELS_CC PLS_CC);
}
- efree(isapi_special_server_variables[SPECIAL_VAR_HTTPS]);
+
+ if (isapi_special_server_variables[SPECIAL_VAR_HTTPS]) {
+ efree(isapi_special_server_variables[SPECIAL_VAR_HTTPS]);
+ }
#ifdef WITH_ZEUS
@@ -624,7 +637,7 @@ DWORD WINAPI HttpExtensionProc(LPEXTENSION_CONTROL_BLOCK lpECB)
CLS_FETCH();
ELS_FETCH();
PLS_FETCH();
-#ifdef PHP_WIN32
+#if !defined (NO_EXCEPTION_HANDLERS) && defined(PHP_WIN32)
LPEXCEPTION_POINTERS e;
#endif
@@ -633,7 +646,9 @@ DWORD WINAPI HttpExtensionProc(LPEXTENSION_CONTROL_BLOCK lpECB)
return HSE_STATUS_ERROR;
}
+#if !defined (NO_EXCEPTION_HANDLERS)
__try {
+#endif
init_request_info(sapi_globals, lpECB);
SG(server_context) = lpECB;
@@ -647,6 +662,7 @@ DWORD WINAPI HttpExtensionProc(LPEXTENSION_CONTROL_BLOCK lpECB)
if (SG(request_info).cookie_data) {
efree(SG(request_info).cookie_data);
}
+#if !defined (NO_EXCEPTION_HANDLERS)
#ifdef PHP_WIN32
} __except(exceptionhandler(&e,GetExceptionInformation())) {
#else
@@ -700,6 +716,9 @@ DWORD WINAPI HttpExtensionProc(LPEXTENSION_CONTROL_BLOCK lpECB)
} __except(EXCEPTION_EXECUTE_HANDLER) {
my_endthread();
}
+#else
+ php_request_shutdown(NULL);
+#endif
return HSE_STATUS_SUCCESS;
}