Patch favicon.patch.txt for Built-in web server Bug #55094
Patch version 2011-07-01 01:56 UTC
Return to Bug #55094 |
Download this patch
Patch Revisions:
Developer: a@example.com
Index: php_cli_server.c
===================================================================
--- php_cli_server.c (revision 312743)
+++ php_cli_server.c (working copy)
@@ -1885,9 +1885,11 @@
php_cli_server_close_connection(server, client TSRMLS_CC);
return FAILURE;
} else if (status == 1) {
- php_cli_server_logf("%s: %s" TSRMLS_CC, client->addr_str, client->request.request_uri);
- php_cli_server_poller_remove(&server->poller, POLLIN, client->sock);
- php_cli_server_dispatch(server, client TSRMLS_CC);
+ if (memcmp(client->request.request_uri, "/favicon.ico", 12)) { // ignore favicon.ico requests
+ php_cli_server_logf("%s: %s" TSRMLS_CC, client->addr_str, client->request.request_uri);
+ php_cli_server_poller_remove(&server->poller, POLLIN, client->sock);
+ php_cli_server_dispatch(server, client TSRMLS_CC);
+ }
} else {
php_cli_server_poller_add(&server->poller, POLLIN, client->sock);
}
|