From b85162590da032ed9899f84f0f48fa1ade35df32 Mon Sep 17 00:00:00 2001 From: George Schlossnagle Date: Tue, 8 Oct 2002 02:17:02 +0000 Subject: sync with head. add optional content type param to send_http_header --- sapi/apache/php_apache.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'sapi/apache/php_apache.c') 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 -- cgit v1.2.1