jorton Mon Jan 17 07:35:29 2005 EDT Modified files: (Branch: PHP_5_0) /php-src/sapi/apache2handler sapi_apache2.c Log: MFH - Fixed bug #31519: Set r->status_line to SAPI-provided status-line. http://cvs.php.net/diff.php/php-src/sapi/apache2handler/sapi_apache2.c?r1=1.40.2.5&r2=1.40.2.6&ty=u Index: php-src/sapi/apache2handler/sapi_apache2.c diff -u php-src/sapi/apache2handler/sapi_apache2.c:1.40.2.5 php-src/sapi/apache2handler/sapi_apache2.c:1.40.2.6 --- php-src/sapi/apache2handler/sapi_apache2.c:1.40.2.5 Thu Dec 16 07:35:43 2004 +++ php-src/sapi/apache2handler/sapi_apache2.c Mon Jan 17 07:35:28 2005 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: sapi_apache2.c,v 1.40.2.5 2004/12/16 12:35:43 sniper Exp $ */ +/* $Id: sapi_apache2.c,v 1.40.2.6 2005/01/17 12:35:28 jorton Exp $ */ #define ZEND_INCLUDE_FULL_WINDOWS_HEADERS @@ -121,9 +121,17 @@ php_apache_sapi_send_headers(sapi_headers_struct *sapi_headers TSRMLS_DC) { php_struct *ctx = SG(server_context); + const char *sline = SG(sapi_headers).http_status_line; ctx->r->status = SG(sapi_headers).http_response_code; + /* httpd requires that r->status_line is set to the first digit of + * the status-code: */ + if (sline && strlen(sline) > 12 && strncmp(sline, "HTTP/1.", 7) == 0 + && sline[8] == ' ') { + ctx->r->status_line = apr_pstrdup(ctx->r->pool, sline + 9); + } + return SAPI_HEADER_SENT_SUCCESSFULLY; }
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php