diff options
Diffstat (limited to 'sapi/cli')
35 files changed, 142 insertions, 21 deletions
diff --git a/sapi/cli/php_cli.c b/sapi/cli/php_cli.c index 907f629c01..09ce00f9e7 100644 --- a/sapi/cli/php_cli.c +++ b/sapi/cli/php_cli.c @@ -103,7 +103,7 @@ PHPAPI extern char *php_ini_scanned_path; PHPAPI extern char *php_ini_scanned_files; #if defined(PHP_WIN32) && defined(ZTS) -ZEND_TSRMLS_CACHE_DEFINE(); +ZEND_TSRMLS_CACHE_DEFINE() #endif #ifndef O_BINARY @@ -304,7 +304,7 @@ static size_t sapi_cli_ub_write(const char *str, size_t str_length) /* {{{ */ if (cli_shell_callbacks.cli_shell_ub_write) { size_t ub_wrote; ub_wrote = cli_shell_callbacks.cli_shell_ub_write(str, str_length); - if (ub_wrote > -1) { + if (ub_wrote != (size_t) -1) { return ub_wrote; } } @@ -689,6 +689,14 @@ static int do_cli(int argc, char **argv) /* {{{ */ #else "NTS " #endif +#ifdef COMPILER + COMPILER + " " +#endif +#ifdef ARCHITECTURE + ARCHITECTURE + " " +#endif #if ZEND_DEBUG "DEBUG " #endif @@ -1018,16 +1026,15 @@ static int do_cli(int argc, char **argv) /* {{{ */ if (exec_begin && zend_eval_string_ex(exec_begin, NULL, "Command line begin code", 1) == FAILURE) { exit_status=254; } - ZVAL_LONG(&argi, index); - zend_hash_str_update(&EG(symbol_table), "argi", sizeof("argi")-1, &argi); while (exit_status == SUCCESS && (input=php_stream_gets(s_in_process, NULL, 0)) != NULL) { len = strlen(input); while (len > 0 && len-- && (input[len]=='\n' || input[len]=='\r')) { input[len] = '\0'; } - ZVAL_STRINGL(&argn, input, len); + ZVAL_STRINGL(&argn, input, len + 1); zend_hash_str_update(&EG(symbol_table), "argn", sizeof("argn")-1, &argn); - Z_LVAL(argi) = ++index; + ZVAL_LONG(&argi, ++index); + zend_hash_str_update(&EG(symbol_table), "argi", sizeof("argi")-1, &argi); if (exec_run) { if (zend_eval_string_ex(exec_run, NULL, "Command line run code", 1) == FAILURE) { exit_status=254; diff --git a/sapi/cli/php_cli_server.c b/sapi/cli/php_cli_server.c index ac41c44def..a9d4a533b3 100644 --- a/sapi/cli/php_cli_server.c +++ b/sapi/cli/php_cli_server.c @@ -96,6 +96,7 @@ #include "ext/standard/html.h" #include "ext/standard/url.h" /* for php_raw_url_decode() */ #include "ext/standard/php_string.h" /* for php_dirname() */ +#include "ext/date/php_date.h" /* for php_format_date() */ #include "php_network.h" #include "php_http_parser.h" @@ -339,15 +340,24 @@ static void append_http_status_line(smart_str *buffer, int protocol_version, int static void append_essential_headers(smart_str* buffer, php_cli_server_client *client, int persistent) /* {{{ */ { - { - char *val; - if (NULL != (val = zend_hash_str_find_ptr(&client->request.headers, "host", sizeof("host")-1))) { - smart_str_appendl_ex(buffer, "Host", sizeof("Host") - 1, persistent); - smart_str_appendl_ex(buffer, ": ", sizeof(": ") - 1, persistent); - smart_str_appends_ex(buffer, val, persistent); - smart_str_appendl_ex(buffer, "\r\n", 2, persistent); - } + char *val; + struct timeval tv = {0}; + + if (NULL != (val = zend_hash_str_find_ptr(&client->request.headers, "host", sizeof("host")-1))) { + smart_str_appendl_ex(buffer, "Host", sizeof("Host") - 1, persistent); + smart_str_appendl_ex(buffer, ": ", sizeof(": ") - 1, persistent); + smart_str_appends_ex(buffer, val, persistent); + smart_str_appendl_ex(buffer, "\r\n", 2, persistent); } + + if (!gettimeofday(&tv, NULL)) { + zend_string *dt = php_format_date("r", 1, tv.tv_sec, 1); + smart_str_appendl_ex(buffer, "Date: ", 6, persistent); + smart_str_appends_ex(buffer, dt->val, persistent); + smart_str_appendl_ex(buffer, "\r\n", 2, persistent); + zend_string_release(dt); + } + smart_str_appendl_ex(buffer, "Connection: close\r\n", sizeof("Connection: close\r\n") - 1, persistent); } /* }}} */ @@ -1964,7 +1974,7 @@ static int php_cli_server_begin_send_static(php_cli_server *server, php_cli_serv if (client->request.path_translated && ('.' == client->request.path_translated[client->request.path_translated_len-1] || ' ' == client->request.path_translated[client->request.path_translated_len-1])) { - return php_cli_server_send_error_page(server, client, 500); + return php_cli_server_send_error_page(server, client, 500 TSRMLS_CC); } #endif diff --git a/sapi/cli/php_cli_server.h b/sapi/cli/php_cli_server.h index d1092f65e1..cdf30bce2a 100644 --- a/sapi/cli/php_cli_server.h +++ b/sapi/cli/php_cli_server.h @@ -33,7 +33,7 @@ ZEND_END_MODULE_GLOBALS(cli_server) #ifdef ZTS #define CLI_SERVER_G(v) ZEND_TSRMG(cli_server_globals_id, zend_cli_server_globals *, v) -ZEND_TSRMLS_CACHE_EXTERN(); +ZEND_TSRMLS_CACHE_EXTERN() #else #define CLI_SERVER_G(v) (cli_server_globals.v) #endif diff --git a/sapi/cli/php_http_parser.c b/sapi/cli/php_http_parser.c index aa9f28638f..5f8eb3ce0b 100644 --- a/sapi/cli/php_http_parser.c +++ b/sapi/cli/php_http_parser.c @@ -89,6 +89,7 @@ static const char *method_strings[] = , "LOCK" , "MKCOL" , "MOVE" + , "MKCALENDAR" , "PROPFIND" , "PROPPATCH" , "SEARCH" @@ -585,7 +586,7 @@ size_t php_http_parser_execute (php_http_parser *parser, case 'G': parser->method = PHP_HTTP_GET; break; case 'H': parser->method = PHP_HTTP_HEAD; break; case 'L': parser->method = PHP_HTTP_LOCK; break; - case 'M': parser->method = PHP_HTTP_MKCOL; /* or MOVE, MKACTIVITY, MERGE, M-SEARCH */ break; + case 'M': parser->method = PHP_HTTP_MKCOL; /* or MOVE, MKCALENDAR, MKACTIVITY, MERGE, M-SEARCH */ break; case 'N': parser->method = PHP_HTTP_NOTIFY; break; case 'O': parser->method = PHP_HTTP_OPTIONS; break; case 'P': parser->method = PHP_HTTP_POST; /* or PROPFIND or PROPPATCH or PUT */ break; @@ -623,6 +624,8 @@ size_t php_http_parser_execute (php_http_parser *parser, } else if (parser->method == PHP_HTTP_MKCOL) { if (index == 1 && ch == 'O') { parser->method = PHP_HTTP_MOVE; + } else if (index == 3 && ch == 'A') { + parser->method = PHP_HTTP_MKCALENDAR; } else if (index == 1 && ch == 'E') { parser->method = PHP_HTTP_MERGE; } else if (index == 1 && ch == '-') { diff --git a/sapi/cli/php_http_parser.h b/sapi/cli/php_http_parser.h index 402e7e3c83..fa4873abeb 100644 --- a/sapi/cli/php_http_parser.h +++ b/sapi/cli/php_http_parser.h @@ -88,6 +88,7 @@ enum php_http_method , PHP_HTTP_LOCK , PHP_HTTP_MKCOL , PHP_HTTP_MOVE + , PHP_HTTP_MKCALENDAR , PHP_HTTP_PROPFIND , PHP_HTTP_PROPPATCH , PHP_HTTP_SEARCH diff --git a/sapi/cli/tests/bug43177.phpt b/sapi/cli/tests/bug43177.phpt index 23af545908..e475fb09b4 100644 --- a/sapi/cli/tests/bug43177.phpt +++ b/sapi/cli/tests/bug43177.phpt @@ -61,6 +61,7 @@ HEADER --EXPECTF-- HTTP/1.1 200 OK Host: localhost +Date: %s Connection: close X-Powered-By: %s Content-type: text/html; charset=UTF-8 @@ -68,18 +69,21 @@ Content-type: text/html; charset=UTF-8 OK HTTP/1.0 500 Internal Server Error Host: localhost +Date: %s Connection: close X-Powered-By: %s Content-type: text/html; charset=UTF-8 HTTP/1.0 500 Internal Server Error Host: localhost +Date: %s Connection: close X-Powered-By: %s Content-type: text/html; charset=UTF-8 HTTP/1.0 500 Internal Server Error Host: localhost +Date: %s Connection: close X-Powered-By: %s Content-type: text/html; charset=UTF-8 diff --git a/sapi/cli/tests/bug64529.phpt b/sapi/cli/tests/bug64529.phpt index 8452953baf..7331b8303e 100644 --- a/sapi/cli/tests/bug64529.phpt +++ b/sapi/cli/tests/bug64529.phpt @@ -5,6 +5,9 @@ Bug #64529 (Ran out of opcode space) if (substr(PHP_OS, 0, 3) == "WIN") { die("skip non windows test"); } +if (!extension_loaded("readline") || !readline_info("done")) { + die("skip readline support required"); +} exec('which expect', $output, $ret); if ($ret) { die("skip no expect installed"); diff --git a/sapi/cli/tests/bug65066_100.phpt b/sapi/cli/tests/bug65066_100.phpt index 901ba188fd..34381d8e96 100644 --- a/sapi/cli/tests/bug65066_100.phpt +++ b/sapi/cli/tests/bug65066_100.phpt @@ -34,6 +34,7 @@ HEADER --EXPECTF-- HTTP/1.1 100 Continue Host: %s +Date: %s Connection: close X-Powered-By: PHP/%s Content-type: text/html; charset=UTF-8 diff --git a/sapi/cli/tests/bug65066_422.phpt b/sapi/cli/tests/bug65066_422.phpt index 4e5d31c7a7..f25ddfbca6 100644 --- a/sapi/cli/tests/bug65066_422.phpt +++ b/sapi/cli/tests/bug65066_422.phpt @@ -34,6 +34,7 @@ HEADER --EXPECTF-- HTTP/1.1 422 Unknown Status Code Host: %s +Date: %s Connection: close X-Powered-By: PHP/%s Content-type: text/html; charset=UTF-8 diff --git a/sapi/cli/tests/bug65066_511.phpt b/sapi/cli/tests/bug65066_511.phpt index a0b4eae393..27c9f9755a 100644 --- a/sapi/cli/tests/bug65066_511.phpt +++ b/sapi/cli/tests/bug65066_511.phpt @@ -34,6 +34,7 @@ HEADER --EXPECTF-- HTTP/1.1 511 Network Authentication Required Host: %s +Date: %s Connection: close X-Powered-By: PHP/%s Content-type: text/html; charset=UTF-8 diff --git a/sapi/cli/tests/bug65633.phpt b/sapi/cli/tests/bug65633.phpt index 456436b1f7..2e9f2796e8 100644 --- a/sapi/cli/tests/bug65633.phpt +++ b/sapi/cli/tests/bug65633.phpt @@ -37,6 +37,7 @@ fclose($fp); ?> --EXPECTF-- HTTP/1.1 200 OK +Date: %s Connection: close X-Powered-By: %s Content-type: text/html; charset=UTF-8 diff --git a/sapi/cli/tests/bug66606_2.phpt b/sapi/cli/tests/bug66606_2.phpt index 9f539873e1..c47b7736c0 100644 --- a/sapi/cli/tests/bug66606_2.phpt +++ b/sapi/cli/tests/bug66606_2.phpt @@ -38,6 +38,7 @@ fclose($fp); --EXPECTF-- HTTP/1.1 200 OK Host: %s +Date: %s Connection: close X-Powered-By: PHP/%s Content-type: text/html; charset=UTF-8 diff --git a/sapi/cli/tests/bug66830.phpt b/sapi/cli/tests/bug66830.phpt index 58c07e031a..b21b33627e 100644 --- a/sapi/cli/tests/bug66830.phpt +++ b/sapi/cli/tests/bug66830.phpt @@ -37,6 +37,7 @@ fclose($fp); --EXPECTF-- HTTP/1.1 200 OK Host: %s +Date: %s Connection: close X-Powered-By: %s Content-type: text/html; charset=UTF-8 diff --git a/sapi/cli/tests/bug67429.phpt b/sapi/cli/tests/bug67429.phpt index 856946b29d..2ad4a27f07 100644 --- a/sapi/cli/tests/bug67429.phpt +++ b/sapi/cli/tests/bug67429.phpt @@ -38,11 +38,13 @@ HEADER ?> --EXPECTF-- HTTP/1.1 308 Permanent Redirect +Date: %s Connection: close X-Powered-By: %s Content-type: text/html; charset=UTF-8 HTTP/1.1 426 Upgrade Required +Date: %s Connection: close X-Powered-By: %s Content-type: text/html; charset=UTF-8 diff --git a/sapi/cli/tests/bug68745.phpt b/sapi/cli/tests/bug68745.phpt index 733d7d0900..4cdfe0ae4e 100644 --- a/sapi/cli/tests/bug68745.phpt +++ b/sapi/cli/tests/bug68745.phpt @@ -27,6 +27,7 @@ fclose($fp); ?> --EXPECTF-- HTTP/1.1 200 OK +Date: %s Connection: close X-Powered-By: %s Content-type: text/html; charset=UTF-8 diff --git a/sapi/cli/tests/bug69655.phpt b/sapi/cli/tests/bug69655.phpt index 188b9c31ee..73791c95d5 100644 --- a/sapi/cli/tests/bug69655.phpt +++ b/sapi/cli/tests/bug69655.phpt @@ -10,7 +10,7 @@ include "skipif.inc"; <?php include "php_cli_server.inc"; php_cli_server_start(); -foreach (['MKCALENDAR', 'MKCO', 'MKCOLL', 'M'] as $method) { +foreach (['MKCO', 'MKCOLL', 'M'] as $method) { $context = stream_context_create(['http' => ['method' => $method]]); // the following is supposed to emit a warning for unsupported methods file_get_contents("http://" . PHP_CLI_SERVER_ADDRESS, false, $context); @@ -25,6 +25,3 @@ Warning: file_get_contents(http://localhost:8964): failed to open stream: HTTP r Warning: file_get_contents(http://localhost:8964): failed to open stream: HTTP request failed! HTTP/1.0 501 Not Implemented in %s on line %d - -Warning: file_get_contents(http://localhost:8964): failed to open stream: HTTP request failed! HTTP/1.0 501 Not Implemented - in %s on line %d diff --git a/sapi/cli/tests/bug69953.phpt b/sapi/cli/tests/bug69953.phpt new file mode 100644 index 0000000000..4de41fee40 --- /dev/null +++ b/sapi/cli/tests/bug69953.phpt @@ -0,0 +1,17 @@ +--TEST-- +FR #69953 (Support MKCALENDAR request method) +--INI-- +allow_url_fopen=1 +--SKIPIF-- +<?php +include "skipif.inc"; +?> +--FILE-- +<?php +include "php_cli_server.inc"; +php_cli_server_start('echo $_SERVER["REQUEST_METHOD"];'); +$context = stream_context_create(['http' => ['method' => 'MKCALENDAR']]); +var_dump(file_get_contents("http://" . PHP_CLI_SERVER_ADDRESS, false, $context)); +?> +--EXPECT-- +string(10) "MKCALENDAR" diff --git a/sapi/cli/tests/bug71005.phpt b/sapi/cli/tests/bug71005.phpt index 3a60dcf42f..f02f261fbf 100644 --- a/sapi/cli/tests/bug71005.phpt +++ b/sapi/cli/tests/bug71005.phpt @@ -39,6 +39,7 @@ HEADER --EXPECTF-- HTTP/1.1 200 OK Host: %s +Date: %s Connection: close X-Powered-By: PHP/%s Content-type: text/html; charset=UTF-8 diff --git a/sapi/cli/tests/bug71624.phpt b/sapi/cli/tests/bug71624.phpt new file mode 100644 index 0000000000..aa4c69da12 --- /dev/null +++ b/sapi/cli/tests/bug71624.phpt @@ -0,0 +1,43 @@ +--TEST-- +Bug #61977 Test that -R properly sets argi and argn +--SKIPIF-- +<?php +include "skipif.inc"; +?> +--FILE-- +<?php + +$php = getenv('TEST_PHP_EXECUTABLE'); + +$filename_txt = dirname(__FILE__) . DIRECTORY_SEPARATOR . "bug71624.test.txt"; + +$txt = 'foo +test +hello +'; + +file_put_contents($filename_txt, $txt); + +$test_args = ['$argi', '$argn']; +foreach ($test_args as $test_arg) { + if (substr(PHP_OS, 0, 3) == 'WIN') { + var_dump(`type "$filename_txt" | "$php" -n -R "echo $test_arg . PHP_EOL;"`); + } else { + var_dump(`cat "$filename_txt" | "$php" -n -R 'echo $test_arg . PHP_EOL;'`); + } +} + +@unlink($filename_txt); + +echo "Done\n"; +?> +--EXPECT-- +string(6) "1 +2 +3 +" +string(15) "foo +test +hello +" +Done diff --git a/sapi/cli/tests/php_cli_server_004.phpt b/sapi/cli/tests/php_cli_server_004.phpt index 8b913f6596..5e3bbec18f 100644 --- a/sapi/cli/tests/php_cli_server_004.phpt +++ b/sapi/cli/tests/php_cli_server_004.phpt @@ -38,6 +38,7 @@ HEADER --EXPECTF-- HTTP/1.1 200 OK Host: %s +Date: %s Connection: close X-Powered-By: PHP/%s Content-type: text/html; charset=UTF-8 diff --git a/sapi/cli/tests/php_cli_server_005.phpt b/sapi/cli/tests/php_cli_server_005.phpt index cdd0ae902f..3f9078c8ae 100644 --- a/sapi/cli/tests/php_cli_server_005.phpt +++ b/sapi/cli/tests/php_cli_server_005.phpt @@ -50,6 +50,7 @@ HEADER --EXPECTF-- HTTP/1.1 200 OK Host: %s +Date: %s Connection: close X-Powered-By: PHP/%s Content-type: text/html; charset=UTF-8 diff --git a/sapi/cli/tests/php_cli_server_006.phpt b/sapi/cli/tests/php_cli_server_006.phpt index ad6d6c9598..c68f1e51b0 100644 --- a/sapi/cli/tests/php_cli_server_006.phpt +++ b/sapi/cli/tests/php_cli_server_006.phpt @@ -34,6 +34,7 @@ HEADER --EXPECTF-- HTTP/1.1 200 OK Host: %s +Date: %s Connection: close X-Powered-By: PHP/%s Content-type: text/html; charset=UTF-8 diff --git a/sapi/cli/tests/php_cli_server_007.phpt b/sapi/cli/tests/php_cli_server_007.phpt index 6420ff5a41..b588b9ee2e 100644 --- a/sapi/cli/tests/php_cli_server_007.phpt +++ b/sapi/cli/tests/php_cli_server_007.phpt @@ -34,6 +34,7 @@ HEADER --EXPECTF-- HTTP/1.1 401 Unauthorized Host: %s +Date: %s Connection: close X-Powered-By: PHP/%s WWW-Authenticate: Digest realm="foo",qop="auth",nonce="XXXXX",opaque="acbd18db4cc2f85cedef654fccc4a4d8" diff --git a/sapi/cli/tests/php_cli_server_008.phpt b/sapi/cli/tests/php_cli_server_008.phpt index 01f825a746..58b2485db5 100644 --- a/sapi/cli/tests/php_cli_server_008.phpt +++ b/sapi/cli/tests/php_cli_server_008.phpt @@ -54,6 +54,7 @@ fclose($fp); --EXPECTF-- HTTP/1.1 200 OK Host: %s +Date: %s Connection: close X-Powered-By: PHP/%s Content-type: text/html; charset=UTF-8 @@ -61,6 +62,7 @@ Content-type: text/html; charset=UTF-8 string(8) "HTTP/1.1" HTTP/1.0 200 OK Host: %s +Date: %s Connection: close X-Powered-By: PHP/%s Content-type: text/html; charset=UTF-8 diff --git a/sapi/cli/tests/php_cli_server_009.phpt b/sapi/cli/tests/php_cli_server_009.phpt index 7f3009b9bd..d63c6abf28 100644 --- a/sapi/cli/tests/php_cli_server_009.phpt +++ b/sapi/cli/tests/php_cli_server_009.phpt @@ -78,6 +78,7 @@ fclose($fp); --EXPECTF-- HTTP/1.1 200 OK Host: %s +Date: %s Connection: close X-Powered-By: PHP/%s Content-type: text/html; charset=UTF-8 @@ -85,6 +86,7 @@ Content-type: text/html; charset=UTF-8 string(8) "/foo/bar" HTTP/1.0 200 OK Host: %s +Date: %s Connection: close X-Powered-By: PHP/%s Content-type: text/html; charset=UTF-8 diff --git a/sapi/cli/tests/php_cli_server_010.phpt b/sapi/cli/tests/php_cli_server_010.phpt index ce3abeb501..fe8f1a98ca 100644 --- a/sapi/cli/tests/php_cli_server_010.phpt +++ b/sapi/cli/tests/php_cli_server_010.phpt @@ -55,6 +55,7 @@ fclose($fp); --EXPECTF-- HTTP/1.1 200 OK Host: %s +Date: %s Connection: close X-Powered-By: PHP/%s Content-type: text/html; charset=UTF-8 @@ -65,6 +66,7 @@ string(8) "/foo/bar" string(7) "foo=bar" HTTP/1.0 200 OK Host: %s +Date: %s Connection: close X-Powered-By: PHP/%s Content-type: text/html; charset=UTF-8 diff --git a/sapi/cli/tests/php_cli_server_012.phpt b/sapi/cli/tests/php_cli_server_012.phpt index 302540f7e6..10b9cdbfe9 100644 --- a/sapi/cli/tests/php_cli_server_012.phpt +++ b/sapi/cli/tests/php_cli_server_012.phpt @@ -40,6 +40,7 @@ fclose($fp); --EXPECTF-- HTTP/1.1 200 OK Host: %s +Date: %s Connection: close X-Powered-By: PHP/%s Content-type: text/html; charset=UTF-8 diff --git a/sapi/cli/tests/php_cli_server_013.phpt b/sapi/cli/tests/php_cli_server_013.phpt index 3ea3ea9cad..23269580fb 100644 --- a/sapi/cli/tests/php_cli_server_013.phpt +++ b/sapi/cli/tests/php_cli_server_013.phpt @@ -83,6 +83,7 @@ fclose($fp); HTTP/1.1 404 Not Found Host: %s +Date: %s Connection: close Content-Type: text/html; charset=UTF-8 Content-Length: %d @@ -91,6 +92,7 @@ Content-Length: %d </head><body><h1>Not Found</h1><p>The requested resource <code class="url">/</code> was not found on this server.</p></body></html> HTTP/1.1 404 Not Found Host: %s +Date: %s Connection: close Content-Type: text/html; charset=UTF-8 Content-Length: %d @@ -99,6 +101,7 @@ Content-Length: %d </head><body><h1>Not Found</h1><p>The requested resource <code class="url">/main/style.css</code> was not found on this server.</p></body></html> HTTP/1.1 404 Not Found Host: %s +Date: %s Connection: close Content-Type: text/html; charset=UTF-8 Content-Length: %d diff --git a/sapi/cli/tests/php_cli_server_014.phpt b/sapi/cli/tests/php_cli_server_014.phpt index 4f812e2f63..7c50a5e30a 100644 --- a/sapi/cli/tests/php_cli_server_014.phpt +++ b/sapi/cli/tests/php_cli_server_014.phpt @@ -65,6 +65,7 @@ fclose($fp); HTTP/1.1 200 OK Host: %s +Date: %s Connection: close X-Powered-By: %s Content-type: %s @@ -72,6 +73,7 @@ Content-type: %s done HTTP/1.1 404 Not Found Host: %s +Date: %s Connection: close Content-Type: %s Content-Length: %d diff --git a/sapi/cli/tests/php_cli_server_015.phpt b/sapi/cli/tests/php_cli_server_015.phpt index af0a3f65a8..663268aea6 100644 --- a/sapi/cli/tests/php_cli_server_015.phpt +++ b/sapi/cli/tests/php_cli_server_015.phpt @@ -41,6 +41,7 @@ fclose($fp); --EXPECTF-- HTTP/1.1 200 OK Host: %s +Date: %s Connection: close X-Powered-By: PHP/%s Content-type: text/html; charset=UTF-8 diff --git a/sapi/cli/tests/php_cli_server_017.phpt b/sapi/cli/tests/php_cli_server_017.phpt index 34e7d5e289..28876dc52b 100644 --- a/sapi/cli/tests/php_cli_server_017.phpt +++ b/sapi/cli/tests/php_cli_server_017.phpt @@ -37,6 +37,7 @@ fclose($fp); --EXPECTF-- HTTP/1.1 200 OK Host: %s +Date: %s Connection: close X-Powered-By: %s Content-type: text/html; charset=UTF-8 diff --git a/sapi/cli/tests/php_cli_server_018.phpt b/sapi/cli/tests/php_cli_server_018.phpt index 44e1292934..acfb0f2ce3 100644 --- a/sapi/cli/tests/php_cli_server_018.phpt +++ b/sapi/cli/tests/php_cli_server_018.phpt @@ -37,6 +37,7 @@ fclose($fp); --EXPECTF-- HTTP/1.1 200 OK Host: %s +Date: %s Connection: close X-Powered-By: %s Content-type: text/html; charset=UTF-8 diff --git a/sapi/cli/tests/php_cli_server_019.phpt b/sapi/cli/tests/php_cli_server_019.phpt index aeb7a9f891..7be87a86c9 100644 --- a/sapi/cli/tests/php_cli_server_019.phpt +++ b/sapi/cli/tests/php_cli_server_019.phpt @@ -41,6 +41,7 @@ fclose($fp); --EXPECTF-- HTTP/1.1 200 OK Host: %s +Date: %s Connection: close X-Powered-By: %s Bar-Foo: Foo diff --git a/sapi/cli/tests/php_cli_server_020.phpt b/sapi/cli/tests/php_cli_server_020.phpt index 4ed673d380..766c666911 100644 --- a/sapi/cli/tests/php_cli_server_020.phpt +++ b/sapi/cli/tests/php_cli_server_020.phpt @@ -33,6 +33,7 @@ HEADER --EXPECTF-- HTTP/1.1 200 OK Host: %s +Date: %s Connection: close X-Powered-By: PHP/%s Content-type: text/html; charset=UTF-8 diff --git a/sapi/cli/tests/upload_2G.phpt b/sapi/cli/tests/upload_2G.phpt index 313dcd5ac1..21dacb439a 100644 --- a/sapi/cli/tests/upload_2G.phpt +++ b/sapi/cli/tests/upload_2G.phpt @@ -21,6 +21,10 @@ if ($f = fopen("/proc/meminfo","r")) { if (empty($enough_free_ram)) { die("skip need +3G free RAM"); } + +if (getenv('TRAVIS')) { + die("skip Fails intermittently on travis"); +} ?> --FILE-- <?php @@ -77,6 +81,7 @@ Test HTTP/1.1 200 OK Host: %s +Date: %s Connection: close X-Powered-By: PHP/%s Content-type: text/html; charset=UTF-8 |
