Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Description of EXIT CODE 25 in man page is not fully correct #12189

Closed
emanuele6 opened this issue Oct 24, 2023 · 0 comments
Closed

Description of EXIT CODE 25 in man page is not fully correct #12189

emanuele6 opened this issue Oct 24, 2023 · 0 comments

Comments

@emanuele6
Copy link
Contributor

I did this

curl.1 describes exit code 25 as:

       25     FTP  could  not STOR file. The server denied the STOR operation,
              used for FTP uploading.

Suggesting it is a FTP only error.

I expected the following

curl can return 25 if any upload fails (e.g. HTTP PUT):

$ cat .bashrc | curl -sST - -0 example.org
curl: (25) Chunky upload is not supported by HTTP 1.0

libcurl-errors.3 describes error 25 (CURLE_UPLOAD_FAILED) as:

       CURLE_UPLOAD_FAILED (25)
              Failed starting the upload. For FTP, the server typically denied
              the STOR command. The error buffer usually contains the server's
              explanation for this.

curl/libcurl version

curl 8.4.0

curl 8.4.0 (x86_64-pc-linux-gnu) libcurl/8.4.0 OpenSSL/3.1.3 zlib/1.3 brotli/1.1.0 zstd/1.5.5 libidn2/2.3.4 libpsl/0.21.2 (+libidn2/2.3.4) libssh2/1.11.0 nghttp2/1.57.0
Release-Date: 2023-10-11
Protocols: dict file ftp ftps gopher gophers http https imap imaps mqtt pop3 pop3s rtsp scp sftp smb smbs smtp smtps telnet tftp
Features: alt-svc AsynchDNS brotli GSS-API HSTS HTTP2 HTTPS-proxy IDN IPv6 Kerberos Largefile libz NTLM PSL SPNEGO SSL threadsafe TLS-SRP UnixSockets zstd

operating system

ArchLinux

Linux t420 6.1.57-1-lts #1 SMP PREEMPT_DYNAMIC Wed, 11 Oct 2023 05:10:50 +0000 x86_64 GNU/Linux
jay added a commit to jay/curl that referenced this issue Oct 24, 2023
- Clarify that curl tool exit code 25 means an upload failed to start.

Exit code 25 is equivalent to CURLE_UPLOAD_FAILED (25). Prior to this
change the documentation only mentioned the case of FTP STOR failing.

Reported-by: Emanuele Torre

Ref: https://github.com/curl/curl/blob/curl-8_4_0/docs/libcurl/libcurl-errors.3#L113-L115

Fixes curl#12189
Closes #xxxx
@jay jay closed this as completed in 7fdf30f Oct 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

2 participants