Previous IDL Reference Guide: Network Objects Next

HTTP and FTP Response Codes

The following tables list the response codes stored in the RESPONSE_CODE property for the last HTTP or FTP request sent to the remote server. See RESPONSE_CODE for more information about the property that holds these values.

The following table lists the error response codes generated by the IDLnetURL object:

Code
Code Number
Description
UNSUPPORTED_PROTOCOL  
1
The URL you passed uses an unsupported protocol. The problem might be an unused compile-time option or a misspelled protocol string.
FAILED_INIT  
2
Very early initialization code failed. This is likely an internal error or problem.
URL_MALFORMAT  
3
The URL was not properly formatted.
URL_MALFORMAT_USER  
4
Not used.
COULDNT_RESOLVE_PROXY  
5
The given proxy host could not be resolved.
COULDNT_RESOLVE_HOST  
6
The given remote host was not resolved.
COULDNT_CONNECT  
7
Failed to connect to host or proxy.
FTP_WEIRD_SERVER_REPLY  
8
After connecting to an FTP server, the IDLnetURL object received a strange or bad reply. The remote server is probably not an OK FTP server.
FTP_ACCESS_DENIED  
9
A service was denied by the FTP server due to lack of access. When a login fails, this is not returned.
FTP_USER_PASSWORD_INCORRECT  
10
This is never returned.
FTP_WEIRD_PASS_REPLY  
11
After sending the FTP password to the server, an unexpected code was received.
FTP_WEIRD_USER_REPLY  
12
After sending a user name to the FTP server, an unexpected code was received.
FTP_WEIRD_PASV_REPLY  
13
The IDLnetURL object did not receive a sensible result from the server in response to either a PASV or EPSV command.
FTP_WEIRD_227_FORMAT  
14
FTP servers return a 227-line as a response to a PASV command. This code is returned if the IDLnetURL object fails to parse that line.
FTP_CANT_GET_HOST  
15
Indicates an internal failure when looking up the host used for the new connection.
FTP_CANT_RECONNECT  
16
A bad return code for either the PASV or EPSV command was sent by the FTP server, preventing the IDLnetURL object from continuing.
FTP_COULDNT_SET_BINARY  
17
An error was received when trying to set the transfer mode to binary.
PARTIAL_FILE  
18
A file transfer was shorter or larger than expected. This happens when the server first reports an expected transfer size, and then delivers data that doesn't match the previously-given size.
FTP_COULDNT_RETR_FILE  
19
Either the server returned a weird reply to a RETR command, or a zero-byte transfer was completed.
FTP_WRITE_ERROR  
20
After a completed file transfer, the FTP server did not send a proper "transfer successful" code.
FTP_QUOTE_ERROR  
21
When sending custom QUOTE commands to the remote server, one of the commands returned an error code of 400 or higher.
HTTP_RETURNED_ERROR  
22
This is returned if CURLOPT_FAILONERROR is TRUE and the HTTP server returns an error code that is >= 400.
WRITE_ERROR  
23
An error occurred when writing received data to a local file, or an error was returned from a write callback.
MALFORMAT_USER  
24
Not used
FTP_COULDNT_STOR_FILE  
25
The server denied the STOR operation. The error buffer usually contains the server's explanation.
READ_ERROR  
26
There was a problem reading a local file, or the read callback returned an error.
OUT_OF_MEMORY  
27
A memory allocation request failed. This is not a good thing.
OPERATION_TIMEOUTED  
28
The specified time-out period was exceeded.
FTP_COULDNT_SET_ASCII  
29
Failed to set ASCII transfer type (TYPE A).
FTP_PORT_FAILED  
30
The FTP PORT command returned an error. This often happens when the address is improper.
FTP_COULDNT_USE_REST  
31
The FTP REST command failed.
FTP_COULDNT_GET_SIZE  
32
The FTP SIZE command failed. SIZE is not a fundamental FTP command; it is an extension and not all servers support it. This is not a surprising error.
HTTP_RANGE_ERROR  
33
The HTTP server does not support or accept range requests.
HTTP_POST_ERROR  
34
This is an odd error that mainly occurs due to internal confusion.
SSL_CONNECT_ERROR  
35
A problem occurred somewhere in the SSL/TLS handshake. Check the error buffer for more information.
AD_DOWNLOAD_RESUME  
36
An FTP resume was attempted beyond the file size.
FILE_COULDNT_READ_FILE  
37
A file in the format of "FILE://" couldn't be opened, most likely because the file path is invalid. File permissions may also be the culprit.
LDAP_CANNOT_BIND  
38
The LDAP bind operation failed.
LDAP_SEARCH_FAILED  
39
LDAP search failed.
LIBRARY_NOT_FOUND  
40
The LDAP library was not found.
FUNCTION_NOT_FOUND  
41
A required LDAP function was not found.
ABORTED_BY_CALLBACK  
42
A callback returned an abort code.
BAD_FUNCTION_ARGUMENT  
43
Internal error. A function was called with a bad parameter.
BAD_CALLING_ORDER  
44
Not used.
INTERFACE_FAILED  
45
A specified outgoing interface could not be used. Use CURLOPT_INTERFACE to set the interface for outgoing connections.
BAD_PASSWORD_ENTERED  
46
Not used.
TOO_MANY_REDIRECTS   
47
Too many redirects. When following redirects, IDL hit the maximum amount. Set your limit with CURLOPT_MAXREDIRS.
UNKNOWN_TELNET_OPTION  
48
An option set with CURLOPT_TELNETOPTIONS was not recognized.
TELNET_OPTION_SYNTAX   
49
A TELNET option string was malformed.
OBSOLETE  
50
Not used.
SSL_PEER_CERTIFICATE  
51
The remote server's SSL certificate is invalid.
GOT_NOTHING  
52
The server returned nothing. In certain circumstances, getting nothing is considered an error.
SSL_ENGINE_NOTFOUND  
53
The specified crypto engine wasn't found.
SSL_ENGINE_SETFAILED  
54
Can not set the selected SSL crypto engine as the default.
SEND_ERROR  
55
Sending network data failed.
RECV_ERROR  
56
Failure in receiving network data.
SHARE_IN_USE  
57
Share is in use.
SSL_CERTPROBLEM  
58
There is a problem with the local certificate.
SSL_CIPHER  
59
Could not use the specified cipher.
SSL_CACERT  
60
The peer certificate cannot be authenticated with known CA certificates.
BAD_CONTENT_ENCODING  
61
Unrecognized transfer encoding.
LDAP_INVALID_URL  
62
Invalid LDAP URL.
FILESIZE_EXCEEDED  
63
Maximum file size exceeded.
FTP_SSL_FAILED  
64
Requested FTP SSL level failed.
SEND_FAIL_REWIND  
65
Sending the data required rewinding the data to retransmit, but the rewind operation failed.
SSL_ENGINE_INITFAILED  
66
Failed to initialize the SSL engine.
LOGIN_DENIED  
67
The user password (or similar) was not accepted and the login failed.
TFTP_NOTFOUND  
68
File not found on TFTP server.
TFTP_PERM  
69
There is a permission problem on the TFTP server.
TFTP_DISKFULL  
70
TFTP server is out of disk space.
TFTP_ILLEGAL  
71
Illegal TFTP operation.
TFTP_UNKNOWNID  
72
Unknown TFTP transfer ID.
TFTP_EXISTS  
73
TFTP file already exists.
TFTP_NOSUCHUSER  
74
No such TFTP user.

The following table lists all the HTTP response codes. Refer to http://www.w3.org/ for detailed specifications.

Code
Number
Code
1xx
Informational  
100
Continue  
101
Switching Protocols  
2xx
Success  
200
OK  
201
Created  
202
Accepted  
203
Non-Authoritative Information  
204
No Content  
205
Reset Content  
206
Partial Content  
207
Multi-Status  
3xx
Redirection  
300
Multiple Choices  
301
Moved Permanently  
302
Found  
303
See Other (since HTTP/1.1)  
304
Not Modified  
305
Use Proxy (since HTTP/1.1)  
306
 
307
Temporary Redirect (since HTTP/1.1)  
4xx
Client Error  
400
Bad Request  
401
Unauthorized  
402
Payment Required  
403
Forbidden  
404
Not Found  
405
Method Not Allowed  
406
Not Acceptable  
407
Proxy Authentication Required  
408
Request Timeout  
409
Conflict  
410
Gone  
411
Length Required  
412
Precondition Failed  
413
Request Entity Too Large  
414
Request-URI Too Long  
415
Unsupported Media Type  
416
Requested Range Not Satisfiable  
417
Expectation Failed  
449
Retry  
5xx
Server Error  
500
Internal Server Error  
501
Not Implemented  
502
Bad Gateway  
503
Service Unavailable  
504
Gateway Timeout  
505
HTTP Version Not Supported  
509
Bandwidth Limit Exceeded  

The following table lists all the FTP response codes. Refer to http://www.w3.org/ for detailed specifications.

Code
Number
Code
110
Restart marker reply.  
120
Service ready in nnn minutes.  
125
Data connection already open; transfer starting.  
150
File status okay; about to open data connection.  
200
Command okay.  
202
Command not implemented, superfluous at this site.  
211
System status, or system help reply.  
212
Directory status.  
213
File status.  
214
Help message.  
215
NAME system type.  
220
Service ready for new user.  
221
Service closing control connection.  
225
Data connection open; no transfer in progress.  
226
Closing data connection.  
227
Entering Passive Mode (h1,h2,h3,h4,p1,p2).  
230
User logged in, proceed.  
250
Requested file action okay, completed.  
257
"PATHNAME" created.  
331
User name okay, need password.  
332
Need account for login.  
350
Requested file action pending further information.  
421
Service not available, closing control connection.  
425
Can't open data connection.  
426
Connection closed; transfer aborted.  
450
Requested file action not taken.  
451
Requested action aborted: local error in processing.  
452
Requested action not taken.  
500
Syntax error, command unrecognized.  
501
Syntax error in parameters or arguments.  
502
Command not implemented.  
503
Bad sequence of commands.  
504
Command not implemented for that parameter.  
530
Not logged in.  
532
Need account for storing files.  
550
Requested action not taken.  
551
Requested action aborted: page type unknown.  
552
Requested file action aborted.  
553
Requested action not taken. File name not allowed.  

  IDL Online Help (March 06, 2007)