summaryrefslogtreecommitdiff
path: root/sapi/isapi/php4isapi.c
diff options
context:
space:
mode:
authorZeev Suraski <zeev@php.net>2000-02-06 22:14:34 +0000
committerZeev Suraski <zeev@php.net>2000-02-06 22:14:34 +0000
commit2da5f17e523de482625b8a971aaa808cd2838656 (patch)
tree7736ce42823033fe43bdca7930733f5e5befe757 /sapi/isapi/php4isapi.c
parent6a75df6cd78bfa9fe958d4b023c7100449019c80 (diff)
downloadphp-git-2da5f17e523de482625b8a971aaa808cd2838656.tar.gz
Fix buglet
Diffstat (limited to 'sapi/isapi/php4isapi.c')
-rw-r--r--sapi/isapi/php4isapi.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/sapi/isapi/php4isapi.c b/sapi/isapi/php4isapi.c
index c31ade74b8..6db380b675 100644
--- a/sapi/isapi/php4isapi.c
+++ b/sapi/isapi/php4isapi.c
@@ -462,7 +462,6 @@ DWORD WINAPI HttpExtensionProc(LPEXTENSION_CONTROL_BLOCK lpECB)
static SYSTEM_INFO si;
static MEMORY_BASIC_INFORMATION mi;
static DWORD dwOldProtect;
- HSE_SEND_HEADER_EX_INFO header_info;
GetSystemInfo(&si);
@@ -487,16 +486,20 @@ DWORD WINAPI HttpExtensionProc(LPEXTENSION_CONTROL_BLOCK lpECB)
CG(unclean_shutdown)=1;
- header_info.pszStatus = "500 Internal Server Error";
+ if (!SG(headers_sent)) {
+ HSE_SEND_HEADER_EX_INFO header_info;
+
+ header_info.pszStatus = "500 Internal Server Error";
#ifndef WITH_ZEUS
- header_info.cchStatus = strlen(header_info.pszStatus);
+ header_info.cchStatus = strlen(header_info.pszStatus);
#endif
- header_info.pszHeader = "Content-Type: text/html\r\n\r\n";
- header_info.cchHeader = strlen(header_info.pszHeader);
+ header_info.pszHeader = "Content-Type: text/html\r\n\r\n";
+ header_info.cchHeader = strlen(header_info.pszHeader);
- lpECB->dwHttpStatusCode = 500;
- lpECB->ServerSupportFunction(lpECB->ConnID, HSE_REQ_SEND_RESPONSE_HEADER_EX, &header_info, NULL, NULL);
- SG(headers_sent)=1;
+ lpECB->dwHttpStatusCode = 500;
+ lpECB->ServerSupportFunction(lpECB->ConnID, HSE_REQ_SEND_RESPONSE_HEADER_EX, &header_info, NULL, NULL);
+ SG(headers_sent)=1;
+ }
sapi_isapi_ub_write("Stack Overflow", sizeof("Stack Overflow")-1);
} else {
ExitThread(0);