thetaphi Fri Oct 31 12:31:48 2003 EDT Modified files: /php-src/sapi/nsapi nsapi.c Log: fix header handler Index: php-src/sapi/nsapi/nsapi.c diff -u php-src/sapi/nsapi/nsapi.c:1.56 php-src/sapi/nsapi/nsapi.c:1.57 --- php-src/sapi/nsapi/nsapi.c:1.56 Fri Oct 31 07:20:33 2003 +++ php-src/sapi/nsapi/nsapi.c Fri Oct 31 12:31:46 2003 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: nsapi.c,v 1.56 2003/10/31 12:20:33 thetaphi Exp $ */ +/* $Id: nsapi.c,v 1.57 2003/10/31 17:31:46 thetaphi Exp $ */ /* * PHP includes @@ -203,7 +203,7 @@ NULL, NULL, PHP_MINFO(nsapi), - "$Revision: 1.56 $", + "$Revision: 1.57 $", STANDARD_MODULE_PROPERTIES }; /* }}} */ @@ -486,12 +486,15 @@ param_free(pblock_remove("content-type", rc->rq->srvhdrs)); pblock_nvinsert("content-type", header_content, rc->rq->srvhdrs); } else { + /* to lower case because NSAPI reformats the headers and wants lowercase */ + for (p=header_name; *p; p++) { + *p=tolower(*p); + } + if (sapi_header->replace) param_free(pblock_remove(header_name, rc->rq->srvhdrs)); pblock_nvinsert(header_name, header_content, rc->rq->srvhdrs); } - *p = ':'; /* restore '*p' */ - - efree(sapi_header->header); + sapi_free_header(sapi_header); return 0; /* don't use the default SAPI mechanism, NSAPI duplicates this functionality */ } @@ -501,10 +504,6 @@ int retval; nsapi_request_context *rc = (nsapi_request_context *)SG(server_context); - /* - * We could probably just do this in the header_handler. But, I - * don't know what the implication of doing it there is. - */ if (SG(sapi_headers).send_default_content_type) { char *hd; param_free(pblock_remove("content-type", rc->rq->srvhdrs));
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php