summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Schlossnagle <gschlossnagle@php.net>2002-10-08 02:17:02 +0000
committerGeorge Schlossnagle <gschlossnagle@php.net>2002-10-08 02:17:02 +0000
commitb85162590da032ed9899f84f0f48fa1ade35df32 (patch)
tree39ed7c0c4a8a64e0df98d27daa3d2967515e9a73
parent868773aa3dfb849d9b22186876a85f521d076735 (diff)
downloadphp-git-b85162590da032ed9899f84f0f48fa1ade35df32.tar.gz
sync with head. add optional content type param to send_http_header
-rw-r--r--sapi/apache/mod_php4.c3
-rw-r--r--sapi/apache/php_apache.c8
2 files changed, 9 insertions, 2 deletions
diff --git a/sapi/apache/mod_php4.c b/sapi/apache/mod_php4.c
index b3f70e5ebe..1f75b3dd5c 100644
--- a/sapi/apache/mod_php4.c
+++ b/sapi/apache/mod_php4.c
@@ -410,8 +410,7 @@ static void sapi_apache_register_server_variables(zval *track_vars_array TSRMLS_
*/
static int php_apache_startup(sapi_module_struct *sapi_module)
{
- if (php_module_startup(sapi_module) == FAILURE
- || zend_startup_module(&apache_module_entry) == FAILURE) {
+ if (php_module_startup(sapi_module, &apache_module_entry, 1) == FAILURE) {
return FAILURE;
} else {
return SUCCESS;
diff --git a/sapi/apache/php_apache.c b/sapi/apache/php_apache.c
index eaa34ddce8..24b580f8b3 100644
--- a/sapi/apache/php_apache.c
+++ b/sapi/apache/php_apache.c
@@ -958,8 +958,15 @@ PHP_FUNCTION(apache_request_send_http_header)
{
zval *id;
request_rec *r;
+ char *type = NULL;
+ int typelen;
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|s", &type, &typelen) == FAILURE)
+ return;
APREQ_GET_REQUEST(id, r);
+ if(type) {
+ r->content_type = pstrdup(r->pool, type);
+ }
ap_send_http_header(r);
AP(headers_sent) = 1;
RETURN_TRUE;
@@ -1324,6 +1331,7 @@ static function_entry php_apache_request_class_functions[] = {
#undef some_auth_required
#undef update_mtime
#undef send_http_header
+#undef send_header_field
#undef basic_http_header
#undef send_http_trace
#undef send_http_options