jorton Mon Jan 17 07:24:41 2005 EDT Modified files: /php-src/sapi/apache2handler sapi_apache2.c Log: 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.50&r2=1.51&ty=u Index: php-src/sapi/apache2handler/sapi_apache2.c diff -u php-src/sapi/apache2handler/sapi_apache2.c:1.50 php-src/sapi/apache2handler/sapi_apache2.c:1.51 --- php-src/sapi/apache2handler/sapi_apache2.c:1.50 Thu Dec 16 07:34:32 2004 +++ php-src/sapi/apache2handler/sapi_apache2.c Mon Jan 17 07:24:40 2005 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: sapi_apache2.c,v 1.50 2004/12/16 12:34:32 sniper Exp $ */ +/* $Id: sapi_apache2.c,v 1.51 2005/01/17 12:24:40 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