php-src/ext/ftp/tests
Christoph M. Becker 42c72ef463
Fix #79100: Wrong FTP error messages
First we need to properly clear the `inbuf`, what is an amendment to
commit d2881adcbc[1].

Then we need to report `php_pollfd_for_ms()` failures right away; just
setting `errno` does not really help, since at least in some cases it
would have been overwritten before we actually could check it.  We use
`php_socket_strerror()` to get a proper error message, and define
`ETIMEDOUT` to the proper value on Windows; otherwise we catch the
definition in errno.h, which is not compatible with WinSock.  The
proper solution for this issue would likely be to include something
like ext/sockets/windows_common.h.

Finally, we ensure that we only report warnings using `inbuf`, if it is
not empty.

[1] <http://git.php.net/?p=php-src.git;a=commit;h=d2881adcbc9be60de7e7d45a3316b0e11b7eb1e8>.

Closes GH-6718.
2021-05-03 15:19:57 +02:00
..
001.phpt
002.phpt
003.phpt
004.phpt Use int instead of integer in type errors 2018-02-04 19:08:23 +01:00
005.phpt
006.phpt Sync leading and final newlines in *.phpt sections 2018-10-15 04:33:09 +02:00
007.phpt Sync leading and final newlines in *.phpt sections 2018-10-15 04:33:09 +02:00
bug7216-2.phpt
bug7216.phpt
bug27809.phpt
bug37799.phpt
bug39458-2.phpt
bug39458.phpt
bug39583-2.phpt
bug39583.phpt
bug79100.phpt Fix #79100: Wrong FTP error messages 2021-05-03 15:19:57 +02:00
bug80901.phpt Fix #80901: Info leak in ftp extension 2021-04-26 15:07:08 +02:00
cert.pem
CONFLICTS Implement fine-grained conflict handling 2019-02-20 11:20:40 +01:00
filesize_large.phpt
ftp_alloc_basic1.phpt Sync leading and final newlines in *.phpt sections 2018-10-15 04:33:09 +02:00
ftp_alloc_basic2.phpt Sync leading and final newlines in *.phpt sections 2018-10-15 04:33:09 +02:00
ftp_append.phpt Use EXPECT instead of EXPECTF when possible 2018-02-20 21:53:48 +01:00
ftp_chmod_basic.phpt
ftp_delete.phpt Expand FTP delete basic test with "unknown file" coverage 2019-02-10 20:41:08 +01:00
ftp_exec_basic.phpt Sync leading and final newlines in *.phpt sections 2018-10-15 04:33:09 +02:00
ftp_fget_basic.phpt Trim trailing whitespace in *.phpt 2018-10-14 19:46:15 +02:00
ftp_fget_basic1.phpt Replace dirname(__FILE__) by __DIR__ in tests 2019-03-15 22:55:30 +01:00
ftp_fget_basic2.phpt Replace dirname(__FILE__) by __DIR__ in tests 2019-03-15 22:55:30 +01:00
ftp_fget_basic3.phpt Replace dirname(__FILE__) by __DIR__ in tests 2019-03-15 22:55:30 +01:00
ftp_fput.phpt Test more functions of ftp 2018-02-19 08:27:37 +01:00
ftp_get_basic.phpt Replace dirname(__FILE__) by __DIR__ in tests 2019-03-15 22:55:30 +01:00
ftp_get_option.phpt Test more functions of ftp 2018-02-19 08:27:37 +01:00
ftp_mdtm_basic.phpt Trim trailing whitespace in *.phpt 2018-10-14 19:46:15 +02:00
ftp_mlsd.phpt ftp_mlsd(): Parse the MLSD response 2017-02-17 21:31:18 +01:00
ftp_mlsd_empty_directory.phpt ftp_mlsd(): Parse the MLSD response 2017-02-17 21:31:18 +01:00
ftp_mlsd_missing_directory.phpt FTP: implement MLSD for structured listing of directories, decribed at https://tools.ietf.org/html/rfc3659 2017-01-29 07:28:22 +00:00
ftp_nb_continue.phpt Replace dirname(__FILE__) by __DIR__ in tests 2019-03-15 22:55:30 +01:00
ftp_nb_fget_basic1.phpt Replace dirname(__FILE__) by __DIR__ in tests 2019-03-15 22:55:30 +01:00
ftp_nb_fget_basic2.phpt Replace dirname(__FILE__) by __DIR__ in tests 2019-03-15 22:55:30 +01:00
ftp_nb_fget_basic3.phpt Replace dirname(__FILE__) by __DIR__ in tests 2019-03-15 22:55:30 +01:00
ftp_nb_fput.phpt Test more functions of ftp 2018-02-19 08:27:37 +01:00
ftp_nb_get_large.phpt Replace dirname(__FILE__) by __DIR__ in tests 2019-03-15 22:55:30 +01:00
ftp_nb_put.phpt Test more functions of ftp 2018-02-19 08:27:37 +01:00
ftp_pasv.phpt Test more functions of ftp 2018-02-19 08:27:37 +01:00
ftp_rawlist_basic1.phpt Test more functions of ftp 2018-02-19 08:27:37 +01:00
ftp_rawlist_basic2.phpt Sync leading and final newlines in *.phpt sections 2018-10-15 04:33:09 +02:00
ftp_rename_basic1.phpt Add tests for ftp_rename 2017-10-28 13:02:23 +02:00
ftp_rmdir_basic.phpt Sync leading and final newlines in *.phpt sections 2018-10-15 04:33:09 +02:00
ftp_set_option.phpt Test more functions of ftp 2018-02-19 08:27:37 +01:00
ftp_set_option_errors.phpt Test more functions of ftp 2018-02-19 08:27:37 +01:00
ftp_site_basic.phpt Increase ext/ftp coverage 2018-02-06 16:28:42 +01:00
ftp_ssl_connect_error.phpt Ignore getaddrinfo failed message 2018-11-08 21:46:03 +01:00
server.inc Fix #79100: Wrong FTP error messages 2021-05-03 15:19:57 +02:00
skipif.inc