[PHP-CVS] branch php-src: fixExceptionBailoutShutdown deleted
Deleted branch: fixExceptionBailoutShutdown User: Nikita Popov ni...@php.net Fri, 20 Apr 2012 12:37:44 + -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: Improved performance while sending error page: NEWS sapi/cli/php_cli_server.c
Commit:cc58373d4d9b0b3d8b0e2cbf86dfee37da799c77 Author:Xinchen Hui larue...@php.net Sat, 21 Apr 2012 00:01:10 +0800 Parents: bca2d6b985dee0d120b0f14f088c1238f8eeef15 Branches: PHP-5.4 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=cc58373d4d9b0b3d8b0e2cbf86dfee37da799c77 Log: Improved performance while sending error page this also fixed bug #61785 (Memory leak when access a non-exists file without router) Bugs: https://bugs.php.net/61785 Changed paths: M NEWS M sapi/cli/php_cli_server.c Diff: diff --git a/NEWS b/NEWS index b2c6a8d..b336316 100644 --- a/NEWS +++ b/NEWS @@ -3,6 +3,9 @@ PHP NEWS ?? ??? 2012, PHP 5.4.1 RC1 - CLI Server: + . Improved performance while sending error page, this also fixed +bug #61785 (Memory leak when access a non-exists file without router). +(Laruence) . Fixed bug #61461 (missing checks around malloc() calls). (Ilia) . Implemented FR #60850 (Built in web server does not set $_SERVER['SCRIPT_FILENAME'] when using router). (Laruence) diff --git a/sapi/cli/php_cli_server.c b/sapi/cli/php_cli_server.c index 79ccea3..105fd60 100644 --- a/sapi/cli/php_cli_server.c +++ b/sapi/cli/php_cli_server.c @@ -98,7 +98,6 @@ #include ext/standard/html.h #include ext/standard/url.h /* for php_url_decode() */ #include ext/standard/php_string.h /* for php_dirname() */ -#include ext/standard/info.h /* for php_info_print_style() */ #include php_network.h #include php_http_parser.h @@ -174,8 +173,6 @@ typedef struct php_cli_server_client { php_cli_server_request request; unsigned int content_sender_initialized:1; php_cli_server_content_sender content_sender; - php_cli_server_buffer capture_buffer; - unsigned int capturing:1; int file_fd; } php_cli_server_client; @@ -276,6 +273,27 @@ static void php_cli_server_log_response(php_cli_server_client *client, int statu ZEND_DECLARE_MODULE_GLOBALS(cli_server); +/* {{{ static char php_cli_server_css[] + * copied from ext/standard/info.c + */ +static char php_cli_server_css[] = style type=\text/css\\n \ + body {background-color: #ff; color: #00;}\n \ + body, td, th, h1, h2 {font-family: sans-serif;}\n \ + .center {text-align: center;}\n \ + .center table { margin-left: auto; margin-right: auto; text-align: left;}\n \ + .center th { text-align: center !important; }\n \ + h1 {font-size: 150%;}\n \ + h2 {font-size: 125%;}\n \ + .p {text-align: left;}\n \ + .e {background-color: #ff; font-weight: bold; color: #00;}\n \ + .h {background-color: #cc; font-weight: bold; color: #00;}\n \ + .v {background-color: #cc; color: #00;}\n \ + .vr {background-color: #cc; text-align: right; color: #00;}\n \ + img {float: right; border: 0px;}\n \ + hr {width: 600px; background-color: #cc; border: 0px; height: 1px; color: #00;}\n \ + /style\n; +/* }}} */ + static void char_ptr_dtor_p(char **p) /* {{{ */ { pefree(*p, 1); @@ -425,17 +443,7 @@ static int sapi_cli_server_ub_write(const char *str, uint str_length TSRMLS_DC) if (!client) { return 0; } - if (client-capturing) { - php_cli_server_chunk *chunk = php_cli_server_chunk_heap_new_self_contained(str_length); - if (!chunk) { - zend_bailout(); - } - memmove(chunk-data.heap.p, str, str_length); - php_cli_server_buffer_append(client-capture_buffer, chunk); - return str_length; - } else { - return php_cli_server_client_send_through(client, str, str_length); - } + return php_cli_server_client_send_through(client, str, str_length); } /* }}} */ static void sapi_cli_server_flush(void *server_context) /* {{{ */ @@ -470,7 +478,7 @@ static int sapi_cli_server_send_headers(sapi_headers_struct *sapi_headers TSRMLS
[PHP-CVS] com php-src: Fixed typo: sapi/cli/tests/php_cli_server_016.phpt
Commit:da85337d13075885f165eeed820181be20d397b9 Author:Xinchen Hui larue...@php.net Sat, 21 Apr 2012 00:11:06 +0800 Parents: cc58373d4d9b0b3d8b0e2cbf86dfee37da799c77 Branches: PHP-5.4 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=da85337d13075885f165eeed820181be20d397b9 Log: Fixed typo report by reeze@gmail.com Changed paths: M sapi/cli/tests/php_cli_server_016.phpt Diff: diff --git a/sapi/cli/tests/php_cli_server_016.phpt b/sapi/cli/tests/php_cli_server_016.phpt index 3fd065a..fc98d1a 100644 --- a/sapi/cli/tests/php_cli_server_016.phpt +++ b/sapi/cli/tests/php_cli_server_016.phpt @@ -1,7 +1,7 @@ --TEST-- Bug #60591 (Memory leak when access a non-exists file) --DESCRIPTION-- -this is a indirect test for bug 50691, since mem leak is reproted in the server side +this is an indirect test for bug 50691, since mem leak is reproted in the server side and require php compiled with --enable-debug --SKIPIF-- ?php -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] com php-src: Improved performance while sending error page: NEWS sapi/cli/php_cli_server.c
+/* {{{ static char php_cli_server_css[] + * copied from ext/standard/info.c + */ +static char php_cli_server_css[] = style type=\text/css\\n \ const, please! Nuno -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: Make css string constant: sapi/cli/php_cli_server.c
Commit:b999e91f5bd0f366d67f18badc02c910729e8a08 Author:Xinchen Hui larue...@php.net Sat, 21 Apr 2012 09:31:00 +0800 Parents: da85337d13075885f165eeed820181be20d397b9 Branches: PHP-5.4 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=b999e91f5bd0f366d67f18badc02c910729e8a08 Log: Make css string constant Changed paths: M sapi/cli/php_cli_server.c Diff: diff --git a/sapi/cli/php_cli_server.c b/sapi/cli/php_cli_server.c index 105fd60..a3ed390 100644 --- a/sapi/cli/php_cli_server.c +++ b/sapi/cli/php_cli_server.c @@ -276,7 +276,7 @@ ZEND_DECLARE_MODULE_GLOBALS(cli_server); /* {{{ static char php_cli_server_css[] * copied from ext/standard/info.c */ -static char php_cli_server_css[] = style type=\text/css\\n \ +static const char php_cli_server_css[] = style type=\text/css\\n \ body {background-color: #ff; color: #00;}\n \ body, td, th, h1, h2 {font-family: sans-serif;}\n \ .center {text-align: center;}\n \ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: typo in test: sapi/cli/tests/php_cli_server_016.phpt
Commit:8d44b91731582705a8be7012e92ddd02eb02af5d Author:Xinchen Hui larue...@php.net Sat, 21 Apr 2012 10:15:35 +0800 Parents: b999e91f5bd0f366d67f18badc02c910729e8a08 Branches: PHP-5.4 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=8d44b91731582705a8be7012e92ddd02eb02af5d Log: typo in test Changed paths: M sapi/cli/tests/php_cli_server_016.phpt Diff: diff --git a/sapi/cli/tests/php_cli_server_016.phpt b/sapi/cli/tests/php_cli_server_016.phpt index fc98d1a..f15aff12 100644 --- a/sapi/cli/tests/php_cli_server_016.phpt +++ b/sapi/cli/tests/php_cli_server_016.phpt @@ -1,7 +1,7 @@ --TEST-- Bug #60591 (Memory leak when access a non-exists file) --DESCRIPTION-- -this is an indirect test for bug 50691, since mem leak is reproted in the server side +this is an indirect test for bug 60591, since mem leak is reproted in the server side and require php compiled with --enable-debug --SKIPIF-- ?php -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php