-diff -urN php-4.1.1.orig/main/SAPI.c php-4.1.1/main/SAPI.c
---- php-4.1.1.orig/main/SAPI.c Mon Feb 4 13:07:01 2002
-+++ php-4.1.1/main/SAPI.c Mon Feb 4 13:29:44 2002
-@@ -25,9 +25,6 @@
+diff -urN php-4_2_0RC3.org/main/SAPI.c php-4_2_0RC3/main/SAPI.c
+--- php-4_2_0RC3.org/main/SAPI.c Sat Apr 13 01:18:30 2002
++++ php-4_2_0RC3/main/SAPI.c Sat Apr 13 01:38:42 2002
+@@ -27,9 +27,6 @@
#include "SAPI.h"
#include "ext/standard/php_string.h"
#include "ext/standard/pageinfo.h"
#ifdef ZTS
#include "TSRM.h"
#endif
-@@ -448,64 +445,8 @@
+@@ -465,65 +462,8 @@
} else if (!STRCASECMP(header_line, "WWW-Authenticate")) { /* HTTP Authentication */
int newlen;
char *result, *newheader;
-
- ptr_len = strlen(ptr);
- MAKE_STD_ZVAL(repl_temp);
+- Z_TYPE_P(repl_temp) = IS_STRING;
- Z_STRVAL_P(repl_temp) = emalloc(32);
- Z_STRLEN_P(repl_temp) = sprintf(Z_STRVAL_P(repl_temp), "realm=\"\\1-%ld\"", myuid);
- /* Modify quoted realm value */
- efree(result);
- conv_len = sprintf(conv_temp," realm=\"%ld\"",myuid);
- result = emalloc(ptr_len+conv_len+1);
-- result_len = ptr_len + conv_len;
+- result_len = ptr_len+conv_len;
- memcpy(result, ptr, ptr_len);
- memcpy(result+ptr_len, conv_temp, conv_len);
- *(result+ptr_len+conv_len) = '\0';
- efree(result);
- efree(Z_STRVAL_P(repl_temp));
- efree(repl_temp);
-- }
+- }
-#else
if(PG(safe_mode)) {
myuid = php_getuid();
result = emalloc(32);
-@@ -516,7 +457,6 @@
+@@ -534,7 +474,6 @@
sapi_header.header_len = newlen;
efree(result);
}