Commit af2d679e authored by Jay Satiro's avatar Jay Satiro
Browse files

errors: new alias CURLE_WEIRD_SERVER_REPLY (8)

Since we're using CURLE_FTP_WEIRD_SERVER_REPLY in imap, pop3 and smtp as
more of a generic "failed to parse" introduce an alias without FTP in
the name.

Closes https://github.com/curl/curl/pull/975
parent add8ee7d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2254,7 +2254,7 @@ Couldn't resolve host. The given remote host was not resolved.
.IP 7
Failed to connect to host.
.IP 8
FTP weird server reply. The server sent data curl couldn't parse.
Weird server reply. The server sent data curl couldn't parse.
.IP 9
FTP access denied. The server denied login or denied access to the particular
resource or directory you wanted to reach. Most often you tried to change to a
+2 −3
Original line number Diff line number Diff line
@@ -60,9 +60,8 @@ Couldn't resolve host. The given remote host was not resolved.
.IP "CURLE_COULDNT_CONNECT (7)"
Failed to connect() to host or proxy.
.IP "CURLE_FTP_WEIRD_SERVER_REPLY (8)"
After connecting to a FTP server, libcurl expects to get a certain reply
back. This error code implies that it got a strange or bad reply. The given
remote server is probably not an OK FTP server.
The server sent data libcurl couldn't parse. This error code is used for more
than just FTP and is aliased as \fICURLE_WEIRD_SERVER_REPLY\fP since 7.51.0.
.IP "CURLE_REMOTE_ACCESS_DENIED (9)"
We were denied access to the resource given in the URL.  For FTP, this occurs
while trying to change to the remote directory.
+1 −0
Original line number Diff line number Diff line
@@ -140,6 +140,7 @@ CURLE_UPLOAD_FAILED 7.16.3
CURLE_URL_MALFORMAT             7.1
CURLE_URL_MALFORMAT_USER        7.1           7.17.0
CURLE_USE_SSL_FAILED            7.17.0
CURLE_WEIRD_SERVER_REPLY        7.51.0
CURLE_WRITE_ERROR               7.1
CURLFILETYPE_DEVICE_BLOCK       7.21.0
CURLFILETYPE_DEVICE_CHAR        7.21.0
+2 −1
Original line number Diff line number Diff line
@@ -435,7 +435,7 @@ typedef enum {
  CURLE_COULDNT_RESOLVE_PROXY,   /* 5 */
  CURLE_COULDNT_RESOLVE_HOST,    /* 6 */
  CURLE_COULDNT_CONNECT,         /* 7 */
  CURLE_FTP_WEIRD_SERVER_REPLY,  /* 8 */
  CURLE_WEIRD_SERVER_REPLY,      /* 8 */
  CURLE_REMOTE_ACCESS_DENIED,    /* 9 a service was denied by the server
                                    due to lack of access - when login fails
                                    this is not returned. */
@@ -566,6 +566,7 @@ typedef enum {

/*  compatibility with older names */
#define CURLOPT_ENCODING CURLOPT_ACCEPT_ENCODING
#define CURLE_FTP_WEIRD_SERVER_REPLY CURLE_WEIRD_SERVER_REPLY

/* The following were added in 7.21.5, April 2011 */
#define CURLE_UNKNOWN_TELNET_OPTION CURLE_UNKNOWN_OPTION
+3 −3
Original line number Diff line number Diff line
@@ -475,7 +475,7 @@ static CURLcode ReceivedServerConnect(struct connectdata *conn, bool *received)
      if(ftpcode/100 > 3)
        return CURLE_FTP_ACCEPT_FAILED;

      return CURLE_FTP_WEIRD_SERVER_REPLY;
      return CURLE_WEIRD_SERVER_REPLY;
    }

    break;
@@ -1835,7 +1835,7 @@ static CURLcode ftp_epsv_disable(struct connectdata *conn)
  if(conn->bits.ipv6) {
    /* We can't disable EPSV when doing IPv6, so this is instead a fail */
    failf(conn->data, "Failed EPSV attempt, exiting\n");
    return CURLE_FTP_WEIRD_SERVER_REPLY;
    return CURLE_WEIRD_SERVER_REPLY;
  }

  infof(conn->data, "Failed EPSV attempt. Disabling EPSV\n");
@@ -2742,7 +2742,7 @@ static CURLcode ftp_statemach_act(struct connectdata *conn)
      else if(ftpcode != 220) {
        failf(data, "Got a %03d ftp-server response when 220 was expected",
              ftpcode);
        return CURLE_FTP_WEIRD_SERVER_REPLY;
        return CURLE_WEIRD_SERVER_REPLY;
      }

      /* We have received a 220 response fine, now we proceed. */
Loading