Go to content

Coffee gone, is that 404 or 410?

Published on

The Hyper Text Coffee Pot Control Protocol (HTCPCP/1.0) is most known for its own status code 418 (I’m a teapot). For most other status codes the specification says that normal HTTP return codes are used to indicate difficulties of the HTCPCP server.

Cappucchino with latte art So, if the coffee pot is empty, should the return code be 404 (Not Found) or 410 (Gone)? If one says that the coffee that was in the coffee pot can never be served again, the 410 (Gone) would be an acceptable response code. On the other hand, if someone PUTs new water and coffee in the machine and turns it on, the coffee pot can be filled with new coffee. In that case it does make sense to try again to request the resource (i.e. coffee) from the coffee pot. That would make the 404 status code a valid use case.

Now that I think of the BREW request, should the HTCPCP also adopt the 102 (Processing) status code from WEBDAV when the coffee machine is making the coffee?