306 Switch Proxy
The HTTP 306 Switch Proxy status code is a reserved and unused code from the HTTP/1.1 specification. The original design intended to redirect a client to an alternate proxy for a specified period.
Usage
The 306 Switch Proxy status code was designed for servers to respond when a client requests a resource through a proxy whose location has changed. The Set-Proxy header, proposed in the same expired Internet-Draft, specifies the new proxy location and the duration the address remains valid. Neither the status code nor the header was ever standardized.
Reserved
The IANA HTTP Status Code Registry lists this code as (Unused). "Switch Proxy" is the historical name from the expired draft (draft-cohen-http-305-306-responses). The HTTP specification reserves the code, and no current HTTP client or server implements the behavior.
Example
The following hypothetical exchange illustrates the
behavior described in the expired draft. The client
requests a resource through a proxy and receives a
306 Switch Proxy response directing traffic to
an alternate proxy for 120 seconds. The Set-Proxy
header was never standardized.
Request
GET /document.pdf HTTP/1.1
Host: proxy.example.re
Response
HTTP/1.1 306 Switch Proxy
Set-Proxy: SET; proxyURI="https://proxy-2.example.re:8080/" scope="http://", seconds=120
Code references
.NET
HttpStatusCode.Unused
Rails
:reserved
Symfony
Response::HTTP_RESERVED
Angular
@angular/common/http/HttpStatusCode.Unused