diff options
author | Ondřej Surý <ondrej@sury.org> | 2012-08-20 08:34:35 +0200 |
---|---|---|
committer | Ondřej Surý <ondrej@sury.org> | 2012-08-20 08:34:35 +0200 |
commit | 45c0aa447e02c80bd21a23245574231a110cf5a1 (patch) | |
tree | b801de455f164afbf40fbbc995ab9751163eee84 /sapi | |
parent | 3365f28adf90110ca7475df889720fc244820f4b (diff) | |
download | php-45c0aa447e02c80bd21a23245574231a110cf5a1.tar.gz |
Imported Upstream version 5.4.6upstream/5.4.6
Diffstat (limited to 'sapi')
-rw-r--r-- | sapi/apache2filter/sapi_apache2.c | 2 | ||||
-rw-r--r-- | sapi/cgi/tests/apache_request_headers.phpt | 2 | ||||
-rw-r--r-- | sapi/cli/config.m4 | 2 | ||||
-rw-r--r-- | sapi/cli/php_cli_server.c | 8 | ||||
-rw-r--r-- | sapi/fpm/fpm/fpm_sockets.c | 6 |
5 files changed, 13 insertions, 7 deletions
diff --git a/sapi/apache2filter/sapi_apache2.c b/sapi/apache2filter/sapi_apache2.c index e8116f9eb..0b51cfbe6 100644 --- a/sapi/apache2filter/sapi_apache2.c +++ b/sapi/apache2filter/sapi_apache2.c @@ -311,7 +311,7 @@ php_apache_disable_caching(ap_filter_t *f) static double php_apache_sapi_get_request_time(TSRMLS_D) { php_struct *ctx = SG(server_context); - return apr_time_as_msec(ctx->r->request_time); + return ((double) apr_time_as_msec(ctx->r->request_time)) / 1000.0; } extern zend_module_entry php_apache_module; diff --git a/sapi/cgi/tests/apache_request_headers.phpt b/sapi/cgi/tests/apache_request_headers.phpt index 3dc3580c2..881b6bb17 100644 --- a/sapi/cgi/tests/apache_request_headers.phpt +++ b/sapi/cgi/tests/apache_request_headers.phpt @@ -31,7 +31,7 @@ echo "Done\n"; ?> --EXPECTF-- X-Powered-By: PHP/%s -Content-type: text/html; charset=UTF-8 +Content-type: text/%s Array ( diff --git a/sapi/cli/config.m4 b/sapi/cli/config.m4 index 77fc5e955..cdfa1f7da 100644 --- a/sapi/cli/config.m4 +++ b/sapi/cli/config.m4 @@ -44,5 +44,7 @@ if test "$PHP_CLI" != "no"; then PHP_SUBST(BUILD_CLI) PHP_OUTPUT(sapi/cli/php.1) + + PHP_INSTALL_HEADERS([sapi/cli/cli.h]) fi AC_MSG_RESULT($PHP_CLI) diff --git a/sapi/cli/php_cli_server.c b/sapi/cli/php_cli_server.c index 876c57a34..e80ab68f8 100644 --- a/sapi/cli/php_cli_server.c +++ b/sapi/cli/php_cli_server.c @@ -1618,7 +1618,11 @@ static int php_cli_server_client_read_request(php_cli_server_client *client, cha client->parser.data = client; nbytes_consumed = php_http_parser_execute(&client->parser, &settings, buf, nbytes_read); if (nbytes_consumed != nbytes_read) { - *errstr = estrdup("Malformed HTTP request"); + if (buf[0] & 0x80 /* SSLv2 */ || buf[0] == 0x16 /* SSLv3/TLSv1 */) { + *errstr = estrdup("Unsupported SSL request"); + } else { + *errstr = estrdup("Malformed HTTP request"); + } return -1; } if (client->current_header_name) { @@ -2403,7 +2407,7 @@ int do_cli_server(int argc, char **argv TSRMLS_DC) /* {{{ */ php_localtime_r(&tv.tv_sec, &tm); php_asctime_r(&tm, buf); printf("PHP %s Development Server started at %s" - "Listening on %s\n" + "Listening on http://%s\n" "Document root is %s\n" "Press Ctrl-C to quit.\n", PHP_VERSION, buf, server_bind_address, document_root); diff --git a/sapi/fpm/fpm/fpm_sockets.c b/sapi/fpm/fpm/fpm_sockets.c index d24dcccc9..f56b9cfbd 100644 --- a/sapi/fpm/fpm/fpm_sockets.c +++ b/sapi/fpm/fpm/fpm_sockets.c @@ -455,11 +455,11 @@ int fpm_socket_get_listening_queue(int sock, unsigned *cur_lq, unsigned *max_lq) #endif -int fpm_socket_unix_test_connect(struct sockaddr_un *sun, size_t socklen) /* {{{ */ +int fpm_socket_unix_test_connect(struct sockaddr_un *sock, size_t socklen) /* {{{ */ { int fd; - if (!sun || sun->sun_family != AF_UNIX) { + if (!sock || sock->sun_family != AF_UNIX) { return -1; } @@ -467,7 +467,7 @@ int fpm_socket_unix_test_connect(struct sockaddr_un *sun, size_t socklen) /* {{{ return -1; } - if (connect(fd, (struct sockaddr *)sun, socklen) == -1) { + if (connect(fd, (struct sockaddr *)sock, socklen) == -1) { return -1; } |