HTTP and FTP common error codes

A detailed breakdown:

 

1xx (provisional response): indicates a provisional response and require the requestor to continue with the operations of the status code.

100 (continued) requestor should continue with the request. The server returns this code indicates a first part of the request has been received and is waiting for the rest. 

101 (Switching protocols) The requestor has switched protocol requires the server, the server is acknowledging that handover.

2xx (Successful): status code indicates a successful request is processed.

 

Note: The 200 delegates to the request, but this does not mean that the returned data is correct

 

200 (success) server has successfully processed the request.

201 (Created) request was successful and the server created a new resource.

202 (accepted) server has accepted the request, but not yet processed.

203 (Non-authoritative information) The server successfully processed the request, but is returning information that may be from another source.

204 (no content) server successfully processed the request, but is not returning any content.

205 (Reset content) server successfully processed the request, but not returning any content.

206 (part of) the server successfully processed a partial GET request.

3xx (redirection): Interface to redirect

300 (choice) for the request, the server may perform various operations. The server may operate a requestor (user agent) selected in accordance with, or provide a list of actions for the requester to select.

301 (Moved Permanently) permanently requested page has been moved to a new location. When the server returns this response (response to a GET or HEAD request), it automatically forwards the requestor to the new location.

302 (Temporary Mobile) means that the interface will be redirected to another URL to go

303 (See other location) requestor to retrieve the response should separate GET request to a different location, the server returns this code.

304 (Not Modified) since the last request, the requested page has not been modified. When the server returns this response, it does not return to the page content.

305 (use proxy) The requestor can only access the requested page using a proxy. If the server returns this response, it said requester use the agent.

307 (temporary redirect) server response to a request from a web page different from the current position, but the requestor should continue to use the original location for future requests.

4xx (request error): These status codes indicate that the request may be wrong, preventing the processing server.

400 (Bad Request) Bad Request request contains a syntax error

 

Cause: Parameter (1) more or less input parameter error (2) input (3) Sometimes the server request timed out error will cause 400

 

401 (Unauthorized) 401 Unauthorized The request requires user authentication current

403 (Prohibition) Forbidden server understood the request, but refused to implement it

 

The reason: the emergence of such cases are generally given permission to access this interface needs, but visitors do not have appropriate access privileges

 

Solution:

 

. A whether the user does not have permission to access;

b. Access is not configured on the server side of this interface, which prohibits any user access

 

404 (not found) server can not find the request.

 

Solve: RUL carefully check the interface is wrong

 

405 (disabling) the method can not be specified in the request line for the respective resource request.

406 (not accepted) can not use the content characteristics requested in response to the requested page.

407 (Proxy Authentication Required) This status code 401 (not authorized), but specifies that the requestor should be authorized to use the proxy.

When a timeout occurs waiting for the request 408 (Request Timeout) server.

Conflict 409 (conflict) occurs when the server to complete the request. The server must include information about the conflict in the response.

410 (Deleted) If the requested resource has been permanently removed, the server returns this response.

411 (length) of the server does not accept the request without a valid Content-Length header field.

412 (Precondition Failed) where the server is not a prerequisite for the requestor in the request is satisfied.

413 (Request entity too large) server can not process the request because it is too large for the server to handle.

414 (Request URI is too long) URI (typically a URL) request is too long, the server can not handle.

415 (Unsupported Media Type) Unsupported Media Type physical format for the current request is not a method of the server and the requested resources, the request submitted supported, so the request is denied

 

Solution:

. A request to see if the added header, general header must be added is Content-Type: application / json; charset = utf-8;  

b. To pay special attention when uploading files, the Content-Type header of the request is not application / json format is multipart / form-data format.

 

416 (Requested range not satisfiable) if the page can not provide the requested range, the server returns this status code.

417 (expected value) server can not meet "desired" request header field requirements.

5xx (Server Error)

 

These status codes indicate internal server error occurred while trying to process the request. These errors may be wrong server itself, not with the request.

 

Code Description

 

500 (Internal Server Error) The server encountered an error and can not fulfill the request.

501 (Not implemented) server does not have to complete the request. For example, the server might not return this code request identification method.

502 (Bad gateway) as a gateway or proxy server received an invalid response from the upstream server.

 

When Bad Gateway server as a gateway or proxy attempts to perform work request received from the upstream to the server invalid response

 

Solution: Check the server

 

503 (Service unavailable) Service Unavailable due to a temporary overloading or maintenance of the server, the server is currently unable to handle the request.

When 504 Gateway Timeout as a gateway or proxy server job execution request attempts, failed from the upstream server (URI identified server, e.g. HTTP, FTP, LDAP) or a secondary server (e.g., DNS) response is received. 

505 (HTTP Version not supported) server does not support HTTP protocol version used in the request

 

FTP

 

1xx - Positive Preliminary reply

These status code indicates that an action has started successfully, but the client wants to get another reply before proceeding new command. 110 Restart marker reply.

 

120 Service ready in nnn minutes.

125 Data connection open, transfer starting.

150 File status okay, about to open data connection.

2xx - Positive Completion reply

 

An action has been completed successfully. The client can execute a new command. 200 Command OK.

 

202 Command not implemented, too many commands on the site.

211 System status, or system help reply.

212 Directory status.

213 file status.

214 help message.

215 NAME system type, where, NAME is an official system name listed in the Assigned Numbers document.

220 Service ready for new user requests.

221 Service closing control connection. If appropriate, please log out.

225 to open a data connection, the transfer is not performed.

226 close the data connection. Requested file operation was successful (e.g., transfer or file abort).

227 into the passive mode (h1, h2, h3, h4, p1, p2).

230 User logged in, proceed.

250 Requested file operation has been completed.

257 has been created "PATHNAME".

3xx - Positive Intermediate reply

 

The command was successful, but the server needs additional information from the client to complete processing the request. 331 User name okay, need password.

 

332 Need account for login.

350 Requested file action pending further information.

4xx - Transient Negative Completion Reply

 

This command is not successful, but the error is temporary. If the client retries the command, it may succeed.

 

421 Service not available, closing control connection. If the service determines that it must shut down, it sends the response to any command.

425 Can not open data connection.

426 Connection closed; transfer aborted.

450 requested action not file. File unavailable (eg, file busy).

451 requested action aborted: local error in processing.

452 requested operation is not performed. Insufficient system memory.

5xx - Permanent Negative Completion Reply

 

This command is not successful, the error is permanent. If the client retries the command, the same error occurs again.

 

500 Syntax error, command is not recognized. This may include errors such as command line too long and the like.

501 Syntax error in the parameters.

502 Command not implemented.

503 Bad sequence of commands.

504 command parameter not implemented.

530 is not logged in.

532 Need account to store files.

550 requested operation is not performed. File unavailable (eg, file not found, no access).

551 requested action aborted: unknown page type.

Requested file operation 552 Aborted: Exceeded storage allocation (or data set to the current directory).

Operation request 553 is not performed. File name not allowed.

 

Common FTP status codes and their causes

 

150 - FTP uses two ports: 21 for sending commands, 20 for transmitting data. Status code 150 indicates that the server opens a new connection on port 20, send some data.

226-- command opens a data connection to perform an operation, such as transferring files on port 20. This operation completed successfully, the data connection is closed.

230-- After the client sends the correct password, displays the status code. It indicates that the user has successfully logged.

331 - the client sends the user name, displaying the status code. Username Regardless of whether the system provides a valid account, it will show the status code.

426-- command opens a data connection to perform an operation, but the operation has been canceled, the data connection is closed.

530-- This status code indicates that the user can not log on because the user name and password combination is not valid. If you use a user login account, you may type the wrong user name or password, or may choose to only allow anonymous access. If you log in using the anonymous account, IIS configuration may refuse anonymous access.

550-- command is not executed because the specified file is not available. For example, to GET the file does not exist, or trying to PUT the file you do not have write permissions to the directory.

Guess you like

Origin www.cnblogs.com/dydxw/p/12274048.html