summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--main/SAPI.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/main/SAPI.c b/main/SAPI.c
index 722c83e978..349a4f4fe6 100644
--- a/main/SAPI.c
+++ b/main/SAPI.c
@@ -657,14 +657,9 @@ SAPI_API int sapi_header_op(sapi_header_op_enum op, void *arg TSRMLS_DC)
#else
{
myuid = php_getuid();
- result = emalloc(sizeof("WWW-Authenticate: ")+20);
- newlen = sprintf(result, "WWW-Authenticate: %ld", myuid);
- newheader = estrndup(result,newlen);
efree(header_line);
- sapi_header.header = newheader;
- sapi_header.header_len = newlen;
- efree(result);
- }
+ sapi_header.header_len = spprintf(&sapi_header.header, 0, "WWW-Authenticate: Basic realm=\"%ld\"", myuid);
+ }
#endif
}
if (sapi_header.header==header_line) {