302
Definition:
Redirect: 302 stands for Temporarily Moved (Temporarily Moved). It means that you visit url A, but url A is redirected to url B because of some server-side interceptor or some other backend code handling.
Scenarios and Methods
The reason for the 302 error here is that my back-end code has written the interceptor Filter, which will be blocked when I visit the interface with A certain keyword path from website A. Therefore, I have modified the keyword of the interface to be accessed by website A so that it will not be blocked by the interceptor, so that I can normally obtain data from the backend.
401
Definition:
Unauthorized: (Unauthorized) Your Web server believes that the HTTP data flow sent by the client is correct, but user authentication is required to access the URL resource when the information is 1) not provided, or 2) provided but does not pass an authorization test. This is commonly known as “HTTP basic authentication.” Authentication requests provided by the client are defined as wwW-authenticate header field in HTTP. Desktop applications generally do not use cookies. Instead, the BASE64 encoded string of “username + colon + password” is sent to the server in header Authorization of the HTTP request. This method is called HTTP Basic Authentication.
The reason:
Because there is no Authorization header in the request, the server will return a 401 unsazied to the client and add information in the header “www-authentivate” of the Response. When the client encodes the user name and password with Base64 encryption and sends it to the server in the Authorization header, the authentication will be successful.
Scenarios and Methods:
[postman] [postman] [postman] [postman] [postman] [postman] [postman] [postman] [postman] [postman] [postman] Hahaha, forgot to add the Authorization request Header. The solution is to add key-value pairs for basic authentication to Headers. Authorization:Basic YKKOw9MPlY3JldA== Authorization:Basic YKKOw9MPlY3JldA==
403
Definition:
HTTP 403 Forbidden 403 Forbidden is a Status Code in the HTTP protocol. You do not have permission to access this site. This status indicates that the server understands the request but refuses to execute the task. The request should not be resent to the server. In cases where the HTTP request method is not “HEAD” and the server wants the client to know why the permission is not available, the server should describe the reason for the rejection in the message returned. In cases where the server does Not want to provide any feedback, the server can use 404 Not Found instead of 403 Forbidden.
The reason:
You don’t have permission to access / on this server.Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.
Scenarios and Methods:
A few days ago, I accidentally saw this error 403. At that time, our link address was https://www.ceshi.com. But it was configured as http://www.ceshi.com by so-and-so; This will result in 403 errors. Solution: Simply change HTTP to HTTPS. Take a closer look: the error should be 403.4. 403.4 The error was caused by requiring SSL. You must use “HTTPS” in the address of the web page you want to view.