DEV Community

Slavius
Slavius

Posted on

So you're into RFCs?

Full RFC

Hyper Text Coffee Pot Control Protocol (HTCPCP/1.0)

Excerpt

1. Rationale and Scope

There is coffee all over the world. Increasingly, in a world in which
computing is ubiquitous, the computists want to make coffee. Coffee
brewing is an art, but the distributed intelligence of the web-
connected world transcends art. Thus, there is a strong, dark, rich
requirement for a protocol designed espressoly for the brewing of
coffee. Coffee is brewed using coffee pots. Networked coffee pots
require a control protocol if they are to be controlled.

Increasingly, home and consumer devices are being connected to the
Internet. Early networking experiments demonstrated vending devices
connected to the Internet for status monitoring [COKE]. One of the
first remotely operated machine to be hooked up to the Internet,
the Internet Toaster, (controlled via SNMP) was debuted in 1990
[RFC2235].

The demand for ubiquitous appliance connectivity that is causing the
consumption of the IPv4 address space. Consumers want remote control
of devices such as coffee pots so that they may wake up to freshly
brewed coffee, or cause coffee to be prepared at a precise time after
the completion of dinner preparations.

This document specifies a Hyper Text Coffee Pot Control Protocol
(HTCPCP), which permits the full request and responses necessary to
control all devices capable of making the popular caffeinated hot
beverages.

HTTP 1.1 ([RFC2068]) permits the transfer of web objects from origin
servers to clients. The web is world-wide. HTCPCP is based on HTTP.
This is because HTTP is everywhere. It could not be so pervasive
without being good. Therefore, HTTP is good. If you want good coffee,
HTCPCP needs to be good. To make HTCPCP good, it is good to base
HTCPCP on HTTP.

2. HTCPCP Protocol

The HTCPCP protocol is built on top of HTTP, with the addition of a
few new methods, header fields and return codes. All HTCPCP servers
should be referred to with the "coffee:" URI scheme (Section 4).

Coffee pots heat water using electronic mechanisms, so there is no
fire. Thus, no firewalls are necessary, and firewall control policy
is irrelevant. However, POST may be a trademark for coffee, and so
the BREW method has been added. The BREW method may be used with
other HTTP-based protocols (e.g., the Hyper Text Brewery Control
Protocol).

2.2.2 New header fields

2.2.2.1 The Accept-Additions header field

In HTTP, the "Accept" request-header field is used to specify media
types which are acceptable for the response. However, in HTCPCP, the
response may result in additional actions on the part of the
automated pot. For this reason, HTCPCP adds a new header field,
"Accept-Additions":

   Accept-Additions = "Accept-Additions" ":"
                      #( addition-range [ accept-params ] )

    addition-type   = ( "*"
                      | milk-type
                      | syrup-type
                      | sweetener-type
                      | spice-type
                      | alcohol-type
                      ) *( ";" parameter )
    milk-type       = ( "Cream" | "Half-and-half" | "Whole-milk"
                      | "Part-Skim" | "Skim" | "Non-Dairy" )
    syrup-type      = ( "Vanilla" | "Almond" | "Raspberry"
                      | "Chocolate" )
    alcohol-type    = ( "Whisky" | "Rum" | "Kahlua" | "Aquavit" )
Enter fullscreen mode Exit fullscreen mode

2.2.3 Omitted Header Fields

No options were given for decaffeinated coffee. What's the point?

2.3.2 418 I'm a teapot

Any attempt to brew coffee with a teapot should result in the error
code "418 I'm a teapot". The resulting entity body MAY be short and
stout.

3. The "coffee" URI scheme

Because coffee is international, there are international coffee URI
schemes. All coffee URL schemes are written with URL encoding of the
UTF-8 encoding of the characters that spell the word for "coffee" in
any of 29 languages, following the conventions for
internationalization in URIs [URLI18N].

coffee-url = coffee-scheme ":" [ "//" host ]
["/" pot-designator ] ["?" additions-list ]

coffee-scheme = ( "koffie" ; Afrikaans, Dutch
| "q%C3%A6hv%C3%A6" ; Azerbaijani
| "%D9%82%D9%87%D9%88%D8%A9" ; Arabic
| "akeita" ; Basque
| "koffee" ; Bengali
| "kahva" ; Bosnian
| "kafe" ; Bulgarian, Czech
| "caf%C3%E8" ; Catalan, French, Galician
| "%E5%92%96%E5%95%A1" ; Chinese
| "kava" ; Croatian
| "k%C3%A1va ; Czech
| "kaffe" ; Danish, Norwegian, Swedish
| "coffee" ; English
| "kafo" ; Esperanto
| "kohv" ; Estonian
| "kahvi" ; Finnish
| "%4Baffee" ; German
| "%CE%BA%CE%B1%CF%86%CE%AD" ; Greek
| "%E0%A4%95%E0%A5%8C%E0%A4%AB%E0%A5%80" ; Hindi
| "%E3%82%B3%E3%83%BC%E3%83%92%E3%83%BC" ; Japanese
| "%EC%BB%A4%ED%94%BC" ; Korean
| "%D0%BA%D0%BE%D1%84%D0%B5" ; Russian
| "%E0%B8%81%E0%B8%B2%E0%B9%81%E0%B8%9F" ; Thai
)

pot-designator = "pot-" integer ; for machines with multiple pots
additions-list = #( addition )

5.2 Crossing firewalls

In most organizations HTTP traffic crosses firewalls fairly easily.
Modern coffee pots do not use fire. However, a "firewall" is useful
for protection of any source from any manner of heat, and not just
fire. Every home computer network SHOULD be protected by a firewall
from sources of heat. However, remote control of coffee pots is
important from outside the home. Thus, it is important that HTCPCP
cross firewalls easily.

By basing HTCPCP on HTTP and using port 80, it will get all of HTTP's
firewall-crossing virtues. Of course, the home firewalls will require
reconfiguration or new versions in order to accommodate HTCPCP-
specific methods, headers and trailers, but such upgrades will be
easily accommodated. Most home network system administrators drink
coffee, and are willing to accommodate the needs of tunnelling
HTCPCP.

7. Security Considerations

Anyone who gets in between me and my morning coffee should be
insecure.

Unmoderated access to unprotected coffee pots from Internet users
might lead to several kinds of "denial of coffee service" attacks.
The improper use of filtration devices might admit trojan grounds.
Filtration is not a good virus protection method.

Top comments (2)

Collapse
 
tux0r profile image
tux0r

And there are software implementations of it. Still lacking hardware support though.

Collapse
 
slavius profile image
Slavius

Going to check my pfSense for firewall HTCPCP helper package ;)