curl/lib
Jonathan Wernberg 9bf79d0a5a
Revert "ftp: Expression 'ftpc->wait_data_conn' is always false"
The reverted commit introduced a logic error in code that was
correct.

The client using libcurl would notice the error since FTP file
uploads in active transfer mode would somtimes complete with
success despite no transfer having been performed and the
"uploaded" file thus not being on the remote server afterwards.

The FTP server would notice the error because it receives a
RST on the data connection it has established with the client
before any data was transferred at all.

The logic error happens if the STOR response from the server have
arrived by the time ftp_multi_statemach() in the affected code path
is called, but the incoming data connection have not arrived yet.
In that case, the processing of the STOR response will cause
'ftpc->wait_data_conn' to be set to TRUE, contradicting the comment
in the code. Since 'complete' will also be set, later logic would
believe the transfer was done.

In most cases, the STOR response will not have arrived yet when
the affected code path is executed, or the incoming connection will
also have arrived, and thus the error would not express itself.
But if the speed difference of the device using libcurl and the
FTP server is exactly right, the error may happen as often as in
one out of hundred file transfers.

This reverts commit 49f3117a23.

Bug: https://curl.se/mail/lib-2021-07/0025.html
Closes #7362
2021-07-08 10:18:25 +02:00
..
vauth infof: remove newline from format strings, always append it 2021-07-07 22:54:01 +02:00
vquic infof: remove newline from format strings, always append it 2021-07-07 22:54:01 +02:00
vssh infof: remove newline from format strings, always append it 2021-07-07 22:54:01 +02:00
vtls infof: remove newline from format strings, always append it 2021-07-07 22:54:01 +02:00
.gitattributes
.gitignore
altsvc.c infof: remove newline from format strings, always append it 2021-07-07 22:54:01 +02:00
altsvc.h
amigaos.c copyright: update copyright year ranges to 2021 2021-05-26 08:18:11 +02:00
amigaos.h
arpa_telnet.h
asyn-ares.c asyn-ares: remove check for 'data' in Curl_resolver_cancel 2021-06-13 23:42:57 +02:00
asyn-thread.c CURLOPT_IPRESOLVE: preventing wrong IP version from being used 2021-05-20 16:58:31 +02:00
asyn.h
base64.c
bufref.c
bufref.h
c-hyper.c infof: remove newline from format strings, always append it 2021-07-07 22:54:01 +02:00
c-hyper.h
checksrc.pl
CMakeLists.txt
config-amigaos.h configure/cmake: remove checks for unused gethostbyaddr and gethostbyaddr_r 2021-06-18 13:52:21 +02:00
config-dos.h config: remove now-unused macros 2021-05-19 00:36:01 +02:00
config-mac.h config: remove now-unused macros 2021-05-19 00:36:01 +02:00
config-os400.h configure/cmake: remove checks for unused gethostbyaddr and gethostbyaddr_r 2021-06-18 13:52:21 +02:00
config-plan9.h configure/cmake: remove checks for unused gethostbyaddr and gethostbyaddr_r 2021-06-18 13:52:21 +02:00
config-riscos.h configure/cmake: remove checks for unused gethostbyaddr and gethostbyaddr_r 2021-06-18 13:52:21 +02:00
config-tpf.h configure/cmake: remove checks for unused gethostbyaddr and gethostbyaddr_r 2021-06-18 13:52:21 +02:00
config-vxworks.h configure/cmake: remove checks for unused gethostbyaddr and gethostbyaddr_r 2021-06-18 13:52:21 +02:00
config-win32.h cmake: fix support for UnixSockets feature on Win32 2021-06-21 14:52:27 +02:00
config-win32ce.h misc: fix typos in comments which repeat a word 2021-06-28 12:41:56 +02:00
conncache.c infof: remove newline from format strings, always append it 2021-07-07 22:54:01 +02:00
conncache.h
connect.c infof: remove newline from format strings, always append it 2021-07-07 22:54:01 +02:00
connect.h
content_encoding.c
content_encoding.h
cookie.c infof: remove newline from format strings, always append it 2021-07-07 22:54:01 +02:00
cookie.h cookies: track expiration in jar to optimize removals 2021-06-08 09:31:19 +02:00
curl_addrinfo.c cmake: fix support for UnixSockets feature on Win32 2021-06-21 14:52:27 +02:00
curl_addrinfo.h
curl_base64.h
curl_config.h.cmake cmake: remove libssh2 feature checks 2021-07-05 22:44:00 +02:00
curl_ctype.c
curl_ctype.h
curl_des.c
curl_des.h
curl_endian.c curl_endian: remove the unused Curl_write64_le function 2021-06-20 23:38:32 +02:00
curl_endian.h
curl_fnmatch.c
curl_fnmatch.h
curl_get_line.c
curl_get_line.h
curl_gethostname.c
curl_gethostname.h
curl_gssapi.c infof: remove newline from format strings, always append it 2021-07-07 22:54:01 +02:00
curl_gssapi.h
curl_hmac.h
curl_krb5.h
curl_ldap.h
curl_md4.h
curl_md5.h
curl_memory.h
curl_memrchr.c
curl_memrchr.h
curl_multibyte.c curl_multibyte: Remove local encoding fallbacks 2021-06-21 01:57:16 -04:00
curl_multibyte.h
curl_ntlm_core.c Curl_ntlm_core_mk_nt_hash: fix OOM in error path 2021-06-01 13:38:01 +02:00
curl_ntlm_core.h
curl_ntlm_wb.c infof: remove newline from format strings, always append it 2021-07-07 22:54:01 +02:00
curl_ntlm_wb.h
curl_path.c
curl_path.h
curl_printf.h
curl_range.c infof: remove newline from format strings, always append it 2021-07-07 22:54:01 +02:00
curl_range.h
curl_rtmp.c
curl_rtmp.h
curl_sasl.c infof: remove newline from format strings, always append it 2021-07-07 22:54:01 +02:00
curl_sasl.h
curl_setup_once.h
curl_setup.h cmake: fix support for UnixSockets feature on Win32 2021-06-21 14:52:27 +02:00
curl_sha256.h
curl_sspi.c
curl_sspi.h
curl_threads.c
curl_threads.h
curlx.h
dict.c infof: remove newline from format strings, always append it 2021-07-07 22:54:01 +02:00
dict.h
doh.c infof: remove newline from format strings, always append it 2021-07-07 22:54:01 +02:00
doh.h
dotdot.c
dotdot.h
dynbuf.c
dynbuf.h
easy.c infof: remove newline from format strings, always append it 2021-07-07 22:54:01 +02:00
easygetopt.c
easyif.h
easyoptions.c
easyoptions.h
escape.c
escape.h
file.c
file.h
fileinfo.c
fileinfo.h
firefox-db2pem.sh
formdata.c formdata: avoid "Argument cannot be negative" warning 2021-07-01 14:15:16 +02:00
formdata.h
ftp.c Revert "ftp: Expression 'ftpc->wait_data_conn' is always false" 2021-07-08 10:18:25 +02:00
ftp.h
ftplistparser.c
ftplistparser.h
getenv.c
getinfo.c
getinfo.h
gopher.c
gopher.h
hash.c
hash.h
hmac.c
hostasyn.c
hostcheck.c hsts: ignore numberical IP address hosts 2021-05-30 19:49:40 +02:00
hostcheck.h
hostip4.c infof: remove newline from format strings, always append it 2021-07-07 22:54:01 +02:00
hostip6.c infof: remove newline from format strings, always append it 2021-07-07 22:54:01 +02:00
hostip.c infof: remove newline from format strings, always append it 2021-07-07 22:54:01 +02:00
hostip.h hsts: ignore numberical IP address hosts 2021-05-30 19:49:40 +02:00
hostsyn.c
hsts.c hsts: ignore numberical IP address hosts 2021-05-30 19:49:40 +02:00
hsts.h
http2.c infof: remove newline from format strings, always append it 2021-07-07 22:54:01 +02:00
http2.h version: turn version number functions into returning void 2021-06-30 23:23:34 +02:00
http_aws_sigv4.c infof: remove newline from format strings, always append it 2021-07-07 22:54:01 +02:00
http_aws_sigv4.h
http_chunks.c
http_chunks.h
http_digest.c lib: fix type of len passed to *printf's %*s 2021-06-30 23:53:58 +02:00
http_digest.h
http_negotiate.c infof: remove newline from format strings, always append it 2021-07-07 22:54:01 +02:00
http_negotiate.h
http_ntlm.c infof: remove newline from format strings, always append it 2021-07-07 22:54:01 +02:00
http_ntlm.h
http_proxy.c infof: remove newline from format strings, always append it 2021-07-07 22:54:01 +02:00
http_proxy.h conn_shutdown: if closed during CONNECT cleanup properly 2021-06-11 12:43:53 +02:00
http.c infof: remove newline from format strings, always append it 2021-07-07 22:54:01 +02:00
http.h c-hyper: add support for transfer-encoding in the request 2021-07-05 22:46:01 +02:00
idn_win32.c
if2ip.c
if2ip.h
imap.c infof: remove newline from format strings, always append it 2021-07-07 22:54:01 +02:00
imap.h
inet_ntop.c configure/cmake: remove checks for unused inet_ntoa and inet_ntoa_r 2021-06-18 13:52:18 +02:00
inet_ntop.h
inet_pton.c
inet_pton.h
krb5.c infof: remove newline from format strings, always append it 2021-07-07 22:54:01 +02:00
ldap.c infof: remove newline from format strings, always append it 2021-07-07 22:54:01 +02:00
libcurl.plist
libcurl.rc
libcurl.vers.in
llist.c
llist.h
Makefile.am
makefile.amiga
makefile.dj
Makefile.inc
Makefile.m32
Makefile.netware configure/cmake: remove checks for unused gethostbyaddr and gethostbyaddr_r 2021-06-18 13:52:21 +02:00
Makefile.vxworks
md4.c
md5.c
memdebug.c
memdebug.h
mime.c
mime.h
mk-ca-bundle.pl
mk-ca-bundle.vbs
mprintf.c msnprintf: return number of printed characters excluding null byte 2021-07-08 10:05:39 +02:00
mqtt.c infof: remove newline from format strings, always append it 2021-07-07 22:54:01 +02:00
mqtt.h
multi.c infof: remove newline from format strings, always append it 2021-07-07 22:54:01 +02:00
multihandle.h openssl: avoid static variable for seed flag 2021-06-29 14:18:15 +02:00
multiif.h
netrc.c netrc: skip 'macdef' definitions 2021-06-13 23:44:41 +02:00
netrc.h
non-ascii.c
non-ascii.h
nonblock.c
nonblock.h
nwlib.c
nwos.c
openldap.c infof: remove newline from format strings, always append it 2021-07-07 22:54:01 +02:00
optiontable.pl
parsedate.c
parsedate.h
pingpong.c infof: remove newline from format strings, always append it 2021-07-07 22:54:01 +02:00
pingpong.h
pop3.c infof: remove newline from format strings, always append it 2021-07-07 22:54:01 +02:00
pop3.h
progress.c
progress.h
psl.c
psl.h
quic.h version: turn version number functions into returning void 2021-06-30 23:23:34 +02:00
rand.c infof: remove newline from format strings, always append it 2021-07-07 22:54:01 +02:00
rand.h
rename.c
rename.h
rtsp.c infof: remove newline from format strings, always append it 2021-07-07 22:54:01 +02:00
rtsp.h configure: disable RTSP when hyper is selected 2021-06-10 08:42:46 +02:00
select.c
select.h lib: don't compare fd to FD_SETSIZE when using poll 2021-06-11 10:33:32 +02:00
sendf.c msnprintf: return number of printed characters excluding null byte 2021-07-08 10:05:39 +02:00
sendf.h
setopt.c test269: disable for hyper 2021-06-03 23:11:11 +02:00
setopt.h
setup-os400.h
setup-vms.h
setup-win32.h
sha256.c
share.c
share.h
sigpipe.h
slist.c
slist.h
smb.c infof: remove newline from format strings, always append it 2021-07-07 22:54:01 +02:00
smb.h
smtp.c infof: remove newline from format strings, always append it 2021-07-07 22:54:01 +02:00
smtp.h
sockaddr.h
socketpair.c Revert "Revert "socketpair: fix potential hangs"" 2021-06-05 12:58:13 +02:00
socketpair.h
socks_gssapi.c infof: remove newline from format strings, always append it 2021-07-07 22:54:01 +02:00
socks_sspi.c infof: remove newline from format strings, always append it 2021-07-07 22:54:01 +02:00
socks.c infof: remove newline from format strings, always append it 2021-07-07 22:54:01 +02:00
socks.h
speedcheck.c
speedcheck.h
splay.c
splay.h
strcase.c
strcase.h
strdup.c
strdup.h
strerror.c CURLE_SETOPT_OPTION_SYNTAX: new error name for wrong setopt syntax 2021-06-02 23:03:55 +02:00
strerror.h
strtok.c
strtok.h
strtoofft.c
strtoofft.h
system_win32.c
system_win32.h
telnet.c infof: remove newline from format strings, always append it 2021-07-07 22:54:01 +02:00
telnet.h
tftp.c infof: remove newline from format strings, always append it 2021-07-07 22:54:01 +02:00
tftp.h
timeval.c copyright: update copyright year ranges to 2021 2021-05-26 08:18:11 +02:00
timeval.h
transfer.c infof: remove newline from format strings, always append it 2021-07-07 22:54:01 +02:00
transfer.h
url.c infof: remove newline from format strings, always append it 2021-07-07 22:54:01 +02:00
url.h
urlapi-int.h
urlapi.c lib: use %u instead of %ld for port number printf 2021-06-30 23:25:35 +02:00
urldata.h c-hyper: abort CONNECT response reading early on non 2xx responses 2021-06-10 08:42:27 +02:00
version_win32.c
version_win32.h
version.c version: turn version number functions into returning void 2021-06-30 23:23:34 +02:00
warnless.c warnless: simplify type size handling 2021-06-04 15:08:10 +02:00
warnless.h
wildcard.c
wildcard.h
x509asn1.c infof: remove newline from format strings, always append it 2021-07-07 22:54:01 +02:00
x509asn1.h