<?xml version="1.0"?>

<!DOCTYPE rfc SYSTEM "rfc2629.dtd">

<rfc number="2324"

     category="info">

<front>

<title abbrev="HTCPCP/1.0">Hyper Text Coffee Pot Control Protocol (HTCPCP/1.0)</title>

<author initials="L." surname="Masinter" fullname="Larry Masinter">

<organization>Xerox Palo Alto Research Center</organization>

<address>

<postal>

<street>3333 Coyote Hill Road</street>

<city>Palo Alto</city>

<region>CA</region>

<code>94304</code>

</postal>

<email>masinter@parc.xerox.com</email>

</address>

</author>

<date month='April' day='1' year='1998' />

<area>General</area>
<keyword>control protocol</keyword>
<keyword>coffee</keyword>

<abstract>
<t>

   This document describes HTCPCP, a protocol for controlling,

   monitoring, and diagnosing coffee pots.
</t>

</abstract>

</front>

<middle>

<!-- RFC original section: (1.) -->

<section title="Rationale and Scope">

<t>

   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.

</t>

<t>

   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].

</t>

<t>

   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.

</t>

<t>

   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.

</t>

<t>

   Future versions of this protocol may include extensions for espresso

   machines and similar devices.

</t>

</section>

<!-- RFC original section: (2.) -->

<section title="HTCPCP Protocol">

<t>

   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).

</t>

<!-- RFC original section: (2.1) -->

<section title="HTCPCP Added Methods">

<t>

</t>

<!-- RFC original section: (2.1.1) -->

<section title="The BREW method, and the use of POST">

<t>

   Commands to control a coffee pot are sent from client to coffee

   server using either the BREW or POST method, and a message body with

   Content-Type set to "application/coffee-pot-command".

</t>

<t>

   A coffee pot server MUST accept both the BREW and POST method

   equivalently.  However, the use of POST for causing actions to happen

   is deprecated.

</t>

<t>

   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).

</t>

</section>

<!-- RFC original section: (2.1.2) -->

<section title="GET method">

<t>

   In HTTP, the GET method is used to mean "retrieve whatever

   information (in the form of an entity) identified by the Request-

   URI." If the Request-URI refers to a data-producing process, it is

   the produced data which shall be returned as the entity in the

   response and not the source text of the process, unless that text

   happens to be the output of the process.
</t><t>
   In HTCPCP, the resources associated with a coffee pot are physical,

   and not information resources. The "data" for most coffee URIs

   contain no caffeine.

</t>

</section>

<!-- RFC original section: (2.1.3) -->

<section title="PROPFIND method">

<t>

   If a cup of coffee is data, metadata about the brewed resource is

   discovered using the PROPFIND method [WEBDAV].

</t>

</section>

<!-- RFC original section: (2.1.4) -->

<section title="WHEN method">

<t>

   When coffee is poured, and milk is offered, it is necessary for the

   holder of the recipient of milk to say "when" at the time when

   sufficient milk has been introduced into the coffee. For this

   purpose, the "WHEN" method has been added to HTCPCP. Enough? Say

   WHEN.

</t>

</section>

</section>

<!-- RFC original section: (2.2) -->

<section title="Coffee Pot Header fields">

<t>

   HTCPCP recommends several HTTP header fields and defines some new

   ones.

</t>

<!-- RFC original section: (2.2.1) -->

<section title="Recommended header fields">

<t>

</t>

<!-- RFC original section: (2.2.1.1) -->

<section title="The &quot;safe&quot; response header field.">

<t>

 <xref target="_XREF_SAFE"/> defines a HTTP response header field, "Safe", which can be

   used to indicate that repeating a HTTP request is safe. The inclusion

   of a "Safe: Yes" header field allows a client to repeat a previous

   request if the result of the request might be repeated.

</t>

<t>

   The actual safety of devices for brewing coffee varies widely, and

   may depend, in fact, on conditions in the client rather than just in

   the server. Thus, this protocol includes an extension to the "Safe"

   response header:

</t>

<figure><artwork>

          Safe                = "Safe" ":" safe-nature

          safe-nature         = "yes" | "no" | conditionally-safe

          conditionally-safe  = "if-" safe-condition

          safe-condition      = "user-awake" | token


</artwork></figure>
<t>

   indication will allow user agents to handle retries of some safe

   requests, in particular safe POST requests, in a more user-friendly

   way.

</t>

</section>

</section>

<!-- RFC original section: (2.2.2) -->

<section title="New header fields">

<t>

</t>

<!-- RFC original section: (2.2.2.1) -->

<section title="The Accept-Additions header field">

<t>

   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":

</t>

<figure><artwork>

       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" )


</artwork></figure>
</section>

</section>

<!-- RFC original section: (2.2.3) -->

<section title="Omitted Header Fields">

<t>

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

</t>

</section>

</section>

<!-- RFC original section: (2.3) -->

<section title="HTCPCP return codes">

<t>

   Normal HTTP return codes are used to indicate difficulties of the

   HTCPCP server. This section identifies special interpretations and

   new return codes.

</t>

<!-- RFC original section: (2.3.1) -->

<section title="406 Not Acceptable">

<t>

   This return code is normally interpreted as "The resource identified

   by the request is only capable of generating response entities which

   have content characteristics not acceptable according to the accept

   headers sent in the request. In HTCPCP, this response code MAY be

   returned if the operator of the coffee pot cannot comply with the

   Accept-Addition request. Unless the request was a HEAD request, the

   response SHOULD include an entity containing a list of available

   coffee additions.
</t><t>
   In practice, most automated coffee pots cannot currently provide

   additions.

</t>

</section>

<!-- RFC original section: (2.3.2) -->

<section title="418 I&apos;m a teapot">

<t>

   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.

</t>

</section>

</section>

</section>

<!-- RFC original section: (3.) -->

<section title="The &quot;coffee&quot; URI scheme">

<t>

   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].

</t>

<figure><artwork>

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 )

</artwork></figure>
<t>
   All alternative coffee-scheme forms are equivalent.  However, the use

   of coffee-scheme in various languages MAY be interpreted as an

   indication of the kind of coffee produced by the coffee pot.  Note

   that while URL scheme names are case-independent, capitalization is

   important for German and thus the initial "K" must be encoded.

</t>

</section>

<!-- RFC original section: (4.) -->

<section title="The &quot;message/coffeepot&quot; media type">

<t>

   The entity body of a POST or BREW request MUST be of Content-Type

   "message/coffeepot". Since most of the information for controlling

   the coffee pot is conveyed by the additional headers, the content of

   "message/coffeepot" contains only a coffee-message-body:

</t>

<t>

   coffee-message-body = "start" | "stop"

</t>

</section>

<!-- RFC original section: (5.) -->

<section title="Operational constraints">

<t>

   This section lays out some of the operational issues with deployment

   of HTCPCP ubiquitously.

</t>

<!-- RFC original section: (5.1) -->

<section title="Timing Considerations">

<t>

   A robust quality of service is required between the coffee pot user

   and the coffee pot service.  Coffee pots SHOULD use the Network Time

   Protocol <xref target="_XREF_NTP"/> to synchronize their clocks to a globally accurate

   time standard.

</t>

<t>

   Telerobotics has been an expensive technology. However, with the

   advent of the Cambridge Coffee Pot [CAM], the use of the web (rather

   than SNMP) for remote system monitoring and management has been

   proven.  Additional coffee pot maintenance tasks might be

   accomplished by remote robotics.

</t>

<t>

   Web data is normally static. Therefore to save data transmission and

   time, Web browser programs store each Web page retrieved by a user on

   the user's computer. Thus, if the user wants to return to that page,

   it is now stored locally and does not need to be requested again from

   the server. An image used for robot control or for monitoring a

   changing scene is dynamic. A fresh version needs to be retrieved from

   the server each time it is accessed.

</t>

</section>

<!-- RFC original section: (5.2) -->

<section title="Crossing firewalls">

<t>

   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.

</t>

<t>

   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.

</t>

</section>

</section>

<!-- RFC original section: (6.) -->

<section title="System management considerations">

<t>

   Coffee pot monitoring using HTTP protocols has been an early

   application of the web.  In the earliest instance, coffee pot

   monitoring was an early (and appropriate) use of ATM networks [CAM].

</t>

<t>

   The traditional technique <xref target="_XREF_CAM"/> was to attach a frame-grabber to a

   video camera, and feed the images to a web server. This was an

   appropriate application of ATM networks. In this coffee pot

   installation, the Trojan Room of Cambridge University laboratories

   was used to give a web interface to monitor a common coffee pot.  of

   us involved in related research and, being poor, impoverished

   academics, we only had one coffee filter machine between us, which

   lived in the corridor just outside the Trojan Room. However, being

   highly dedicated and hard-working academics, we got through a lot of

   coffee, and when a fresh pot was brewed, it often didn't last long.

</t>

<t>

   This service was created as the first application to use a new RPC

   mechanism designed in the Cambridge Computer Laboratory - MSRPC2. It

   runs over MSNL (Multi-Service Network Layer) - a network layer

   protocol designed for ATM networks.

</t>

<t>

   Coffee pots on the Internet may be managed using the Coffee Pot MIB

   [CPMIB].

</t>

</section>

<!-- RFC original section: (7.) -->

<section title="Security Considerations">

<t>

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

   insecure.

</t>

<t>

   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.

   Putting coffee grounds into Internet plumbing may result in clogged

   plumbing, which would entail the services of an Internet Plumber

   [PLUMB], who would, in turn, require an Internet Plumber's Helper.

</t>

<t>

   Access authentication will be discussed in a separate memo.

</t>

</section>

<!-- RFC original section: (8.) -->

<section title="Acknowledgements">

<t>

   Many thanks to the many contributors to this standard, including Roy

   Fielding, Mark Day, Keith Moore, Carl Uno-Manros, Michael Slavitch,

   and Martin Duerst.  The inspiration of the Prancing Pony, the CMU

   Coke Machine, the Cambridge Coffee Pot, the Internet Toaster, and

   other computer controlled remote devices have led to this valuable

   creation.

</t>

</section>

</middle>

<back>

<!-- BEGIN INCLUDE REFERENCES ** DO NOT REMOVE -->
<references>
<reference anchor="_XREF_RFC2068">
<front>
<title>Hypertext Transfer Protocol -- HTTP/1.1</title>
<author initials="R." surname="Fielding" fullname="R. Fielding">
<organization/>
</author>
<author initials="J." surname="Gettys" fullname="J. Gettys">
<organization/>
</author>
<author initials="J." surname="Mogul" fullname="J. Mogul">
<organization/>
</author>
<author initials="H." surname="Frystyk" fullname="H. Frystyk">
<organization/>
</author>
<author initials="T." surname="Berners-Lee" fullname="T. Berners-Lee">
<organization/>
</author>
<date month="January" year="1997"/>
</front>
<seriesInfo>RFC 2068</seriesInfo>
</reference>
<reference anchor="_XREF_RFC2186">
<front>
<title abbrev="Internet Cache Protocol (ICP">Internet Cache Protocol (ICP), version 2</title>
<author initials="D." surname="Wessels" fullname="D. Wessels">
<organization/>
</author>
<author initials="K." surname="Claffy" fullname="K. Claffy">
<organization/>
</author>
<date month="September" year="1997"/>
</front>
<seriesInfo>RFC 2186</seriesInfo>
</reference>
<reference anchor="_XREF_CPMIB">
<front>
<title abbrev="Definitions of Managed Objects for Drip-Ty">Definitions of Managed Objects for Drip-Type Heated Beverage Hardware Devices using SMIv2,  1</title>
<author initials="M." surname="Slavitch" fullname="M. Slavitch">
<organization/>
</author>
<date month="April" year="1998"/>
</front>
<seriesInfo>RFC 2325</seriesInfo>
</reference>
<reference anchor="_XREF_HTSVMP">
<front>
<title abbrev="Hyper Text Sandwich Van Monitoring">Hyper Text Sandwich Van Monitoring Protocol, Version 3.2, . In preparation</title>
<author initials="Q." surname="Stafford-Fraser" fullname="Q. Stafford-Fraser">
<organization/>
</author>
<date month="" year=""/>
</front>
</reference>
<reference anchor="_XREF_RFC2295">
<front>
<title>Transparent Content Negotiation in HTTP</title>
<author initials="K." surname="Holtman" fullname="K. Holtman">
<organization/>
</author>
<author initials="A." surname="Mutz" fullname="A. Mutz">
<organization/>
</author>
<date month="March" year="1998"/>
</front>
<seriesInfo>RFC 2295</seriesInfo>
</reference>
<reference anchor="_XREF_SAFE">
<front>
<title>K. Holtman. The Safe Response Header Field</title>
<author>
<organization/>
</author>
<date month="September" year="1997"/>
</front>
</reference>
<reference anchor="_XREF_CAM" target="http://www.cl.cam.ac.uk/coffee/coffee.html">
<front>
<title abbrev="The Trojan Room Coffee Machine">The Trojan Room Coffee Machine,  D. Gordon and M. Johnson, University of Cambridge Computer Lab, &lt;http://www.cl.cam.ac.uk/coffee/coffee.html</title>
<author>
<organization/>
</author>
<date month="" year=""/>
</front>
</reference>
<reference anchor="_XREF_CBIO" target="http://www.cl.cam.ac.uk/coffee/qsf/coffee.html">
<front>
<title abbrev="The Trojan Room Coffee Pot, a (non-technic">The Trojan Room Coffee Pot, a (non-technical) biography,  Q. Stafford-Fraser, University of Cambridge Computer Lab, &lt;http://www.cl.cam.ac.uk/coffee/qsf/coffee.html</title>
<author>
<organization/>
</author>
<date month="" year=""/>
</front>
</reference>
<reference anchor="_XREF_RFC2235" target="http://www.internode.com.au/images/toaster2.jpg">
<front>
<title abbrev="Hobbes&apos; Internet Timeline">Hobbes&apos; Internet Timeline,  See also &lt;http://www.internode.com.au/images/toaster2.jpg</title>
<author initials="R." surname="Zakon" fullname="R. Zakon">
<organization/>
</author>
<date month="November" year="1997"/>
</front>
<seriesInfo>FYI 32</seriesInfo>
<seriesInfo>RFC 2230</seriesInfo>
</reference>
<reference anchor="_XREF_NTP">
<front>
<title abbrev="Network Time Protocol (Version 3">Network Time Protocol (Version 3) Specification, Implementation and Analysis</title>
<author initials="D." surname="Mills" fullname="D. Mills">
<organization/>
</author>
<date month="March" year="1992"/>
</front>
<seriesInfo>RFC 1305</seriesInfo>
</reference>
<reference anchor="_XREF_URLI18N">
<front>
<title abbrev="Using UTF8 for non-ASCII Characters in">Using UTF8 for non-ASCII Characters in Extended URIs Work in Progress</title>
<author initials="L." surname="Masinter" fullname="L. Masinter">
<organization/>
</author>
<date month="" year=""/>
</front>
</reference>
<reference anchor="_XREF_PLUMB">
<front>
<title abbrev="Internet Plumber of the Year: Jim Gettys">Internet Plumber of the Year: Jim Gettys,  Infoworld</title>
<author initials="B." surname="Metcalfe" fullname="B. Metcalfe">
<organization/>
</author>
<date month="February" year="1998"/>
</front>
</reference>
<reference anchor="_XREF_COKE" target="http://www-cse.ucsd.edu/users/bsy/coke.history.txt">
<front>
<title abbrev="Coke machine history">Coke machine history,  C. Everhart, Interesting uses of networking &lt;http://www-cse.ucsd.edu/users/bsy/coke.history.txt</title>
<author initials="D." surname="Nichols" fullname="D. Nichols">
<organization/>
</author>
<date month="" year=""/>
</front>
</reference>
</references>
<!-- END INCLUDE REFERENCES ** DO NOT REMOVE -->

</back>

</rfc>
