subscribe

306 Switch Proxy

The HTTP specifications, starting from RFC2616 have a gap between the 305 and 307 status codes.

The specification states:

The 306 status code was defined in a previous version of this specification, is no longer used, and the code is reserved.

Naturally I was curious what it used to be, so I went through all the drafts of RFC2616 and RFC2068, but couldn’t find a mention of it, except that it was reserved.

After some googling and digging into old mailing list archives, I found a separate draft unrelated to the core specification. This document from 1996 wants to define 306 as 306 Switch Proxy.

The purpose of the response is a bit different from 305. The idea is that if a HTTP client already used a proxy, this response can be used to tell a client that the client should start using a new proxy.

This was deemed as a security risk, and ultimately dropped from the specifications. 306 should not be used by anyone. It’s still an interesting bit of HTTP history though!

Example

HTTP/1.1 306 Switch Proxy
Set-Proxy: SET; proxyURI="https://proxy.example.org:8080/" scope="http://", seconds=100

The preceding response would tell a client to use proxy.example.org for all http:// requests for the next 100 seconds.

The scope could also be limited to specific domains, specific paths or everything using *.

References

HTTP series

This article is part of a series about the HTTP protocol. Read them all here:

Informational 1xx

Successful 2xx

Redirection 3xx

Client Error 4xx

Server Error 5xx

Web mentions