About 203 Non-Authoritative Information
Overview of 203 Non-Authoritative Information
Returning Non-Guaranteed Informationwith an HTTP Status Code | ||
203 Non-Authoritative Information Overview The 203 Non-Authoritative Information status code indicates that a request was successful, but the response data provided by the server does not exactly match the data from the original source (origin server). It is commonly used when a proxy server modifies the response before returning it to the client. |
||
Meaning The client’s request was successful, but the returned information may not fully match the original data. |
When is 203 Non-Authoritative Information Returned?
- When a proxy server modifies the response from the origin server
- When the server filters or alters the original information
- When a cache server provides incomplete or modified data
Examples of 203 Non-Authoritative Information
Response Modified by a Proxy
GET /resource HTTP/1.1 Host: example.com
Response example:
HTTP/1.1 203 Non-Authoritative Information Content-Type: application/json { "id": 123, "name": "Modified Resource", "note": "This data was altered by a proxy." }
Explanation: In this example, the client sends a request, and the proxy server modifies the response content before returning it to the client. For instance, the proxy might add annotations to the data or remove certain fields, resulting in a 203 status code.
Filtered or Processed Data
GET /data HTTP/1.1 Host: example.com
Response example:
HTTP/1.1 203 Non-Authoritative Information Content-Type: application/json { "original": false, "data": "Filtered content" }
Explanation: When the server applies filtering or processing to the original data before returning it, the 203 status code may be used. This informs the client that the returned data is not the unaltered original content.
Points to Note
Considerations when using the 203 Non-Authoritative Information status code:
- Clearly notify about data modifications
Include appropriate annotations or metadata in the response to help the client understand the modifications. - Explicitly highlight differences from the original data
Clearly document the reasons for and details of any alterations made to the data.
Comparison with Related HTTP Status Codes
Here is an explanation of status codes related to 203 Non-Authoritative Information:
- 200 OK: Used when the request is successful and the original data is returned unchanged.
- 206 Partial Content: Used when partial data is returned in response to a request.
Understanding these differences helps in appropriately using the 203 status code.