305 Use Proxy
HTTP response status code 305 Use Proxy is a deprecated HTTP status code returned by an origin server to indicate that the requested resource can only be accessed through a proxy.
Usage
The 305 Use Proxy status code is used to instruct the client that the requested resource must be obtained through a proxy and includes the new address in the Set-Proxy HTTP header, or if the Set-Proxy HTTP header is absent, in the Location HTTP header.
Note
The HTTP 305 Use Proxy status code has been deprecated due to security concerns and many HTTP clients do not act on this status code.
Example
In the example, the client requests a specific resource, and the server returns with 305 Use Proxy status code as an instruction for where the client can send an identical HTTP request.
Request
GET /document.pdf HTTP/1.1
Host: www.example.re
Response
HTTP/1.1 305 Use Proxy
Location: https://proxy.example.re:8080
Code references
.NET
HttpStatusCode.UseProxy
Rust
http::StatusCode::USE_PROXY
Rails
:use_proxy
Go
http.StatusUseProxy
Symfony
Response::HTTP_USE_PROXY
Python3.5+
http.HTTPStatus.USE_PROXY
Java
java.net.HttpURLConnection.HTTP_USE_PROXY
Apache HttpComponents Core
org.apache.hc.core5.http.HttpStatus.SC_USE_PROXY
Angular
@angular/common/http/HttpStatusCode.UseProxy
Takeaway
The 305 Use Proxy status code indicates that the HTTP request needs to be made through a proxy, and specifies the Location that a subsequent, identical HTTP request shall be made.