Git init
[profile/ivi/libsoup2.4.git] / docs / specs / rfc2324.txt
1
2
3
4
5
6
7 Network Working Group                                       L. Masinter
8 Request for Comments: 2324                                 1 April 1998
9 Category: Informational
10
11
12           Hyper Text Coffee Pot Control Protocol (HTCPCP/1.0)
13
14 Status of this Memo
15
16    This memo provides information for the Internet community.  It does
17    not specify an Internet standard of any kind.  Distribution of this
18    memo is unlimited.
19
20 Copyright Notice
21
22    Copyright (C) The Internet Society (1998).  All Rights Reserved.
23
24 Abstract
25
26    This document describes HTCPCP, a protocol for controlling,
27    monitoring, and diagnosing coffee pots.
28
29 1. Rationale and Scope
30
31    There is coffee all over the world. Increasingly, in a world in which
32    computing is ubiquitous, the computists want to make coffee. Coffee
33    brewing is an art, but the distributed intelligence of the web-
34    connected world transcends art.  Thus, there is a strong, dark, rich
35    requirement for a protocol designed espressoly for the brewing of
36    coffee. Coffee is brewed using coffee pots.  Networked coffee pots
37    require a control protocol if they are to be controlled.
38
39    Increasingly, home and consumer devices are being connected to the
40    Internet. Early networking experiments demonstrated vending devices
41    connected to the Internet for status monitoring [COKE]. One of the
42    first remotely _operated_ machine to be hooked up to the Internet,
43    the Internet Toaster, (controlled via SNMP) was debuted in 1990
44    [RFC2235].
45
46    The demand for ubiquitous appliance connectivity that is causing the
47    consumption of the IPv4 address space. Consumers want remote control
48    of devices such as coffee pots so that they may wake up to freshly
49    brewed coffee, or cause coffee to be prepared at a precise time after
50    the completion of dinner preparations.
51
52
53
54
55
56
57
58 Masinter                     Informational                      [Page 1]
59 \f
60 RFC 2324                       HTCPCP/1.0                   1 April 1998
61
62
63    This document specifies a Hyper Text Coffee Pot Control Protocol
64    (HTCPCP), which permits the full request and responses necessary to
65    control all devices capable of making the popular caffeinated hot
66    beverages.
67
68    HTTP 1.1 ([RFC2068]) permits the transfer of web objects from origin
69    servers to clients. The web is world-wide.  HTCPCP is based on HTTP.
70    This is because HTTP is everywhere. It could not be so pervasive
71    without being good. Therefore, HTTP is good. If you want good coffee,
72    HTCPCP needs to be good. To make HTCPCP good, it is good to base
73    HTCPCP on HTTP.
74
75    Future versions of this protocol may include extensions for espresso
76    machines and similar devices.
77
78 2. HTCPCP Protocol
79
80    The HTCPCP protocol is built on top of HTTP, with the addition of a
81    few new methods, header fields and return codes.  All HTCPCP servers
82    should be referred to with the "coffee:" URI scheme (Section 4).
83
84 2.1 HTCPCP Added Methods
85
86 2.1.1 The BREW method, and the use of POST
87
88    Commands to control a coffee pot are sent from client to coffee
89    server using either the BREW or POST method, and a message body with
90    Content-Type set to "application/coffee-pot-command".
91
92    A coffee pot server MUST accept both the BREW and POST method
93    equivalently.  However, the use of POST for causing actions to happen
94    is deprecated.
95
96    Coffee pots heat water using electronic mechanisms, so there is no
97    fire. Thus, no firewalls are necessary, and firewall control policy
98    is irrelevant. However, POST may be a trademark for coffee, and so
99    the BREW method has been added. The BREW method may be used with
100    other HTTP-based protocols (e.g., the Hyper Text Brewery Control
101    Protocol).
102
103 2.1.2 GET method
104
105    In HTTP, the GET method is used to mean "retrieve whatever
106    information (in the form of an entity) identified by the Request-
107    URI." If the Request-URI refers to a data-producing process, it is
108    the produced data which shall be returned as the entity in the
109    response and not the source text of the process, unless that text
110    happens to be the output of the process.
111
112
113
114 Masinter                     Informational                      [Page 2]
115 \f
116 RFC 2324                       HTCPCP/1.0                   1 April 1998
117
118
119    In HTCPCP, the resources associated with a coffee pot are physical,
120    and not information resources. The "data" for most coffee URIs
121    contain no caffeine.
122
123 2.1.3 PROPFIND method
124
125    If a cup of coffee is data, metadata about the brewed resource is
126    discovered using the PROPFIND method [WEBDAV].
127
128 2.1.4 WHEN method
129
130    When coffee is poured, and milk is offered, it is necessary for the
131    holder of the recipient of milk to say "when" at the time when
132    sufficient milk has been introduced into the coffee. For this
133    purpose, the "WHEN" method has been added to HTCPCP. Enough? Say
134    WHEN.
135
136 2.2 Coffee Pot Header fields
137
138    HTCPCP recommends several HTTP header fields and defines some new
139    ones.
140
141 2.2.1 Recommended header fields
142
143 2.2.1.1 The "safe" response header field.
144
145    [SAFE] defines a HTTP response header field, "Safe", which can be
146    used to indicate that repeating a HTTP request is safe. The inclusion
147    of a "Safe: Yes" header field allows a client to repeat a previous
148    request if the result of the request might be repeated.
149
150    The actual safety of devices for brewing coffee varies widely, and
151    may depend, in fact, on conditions in the client rather than just in
152    the server. Thus, this protocol includes an extension to the "Safe"
153    response header:
154
155           Safe                = "Safe" ":" safe-nature
156           safe-nature         = "yes" | "no" | conditionally-safe
157           conditionally-safe  = "if-" safe-condition
158           safe-condition      = "user-awake" | token
159
160    indication will allow user agents to handle retries of some safe
161    requests, in particular safe POST requests, in a more user-friendly
162    way.
163
164
165
166
167
168
169
170 Masinter                     Informational                      [Page 3]
171 \f
172 RFC 2324                       HTCPCP/1.0                   1 April 1998
173
174
175 2.2.2 New header fields
176
177 2.2.2.1 The Accept-Additions header field
178
179    In HTTP, the "Accept" request-header field is used to specify media
180    types which are acceptable for the response. However, in HTCPCP, the
181    response may result in additional actions on the part of the
182    automated pot. For this reason, HTCPCP adds a new header field,
183    "Accept-Additions":
184
185
186        Accept-Additions = "Accept-Additions" ":"
187                           #( addition-range [ accept-params ] )
188
189         addition-type   = ( "*"
190                           | milk-type
191                           | syrup-type
192                           | sweetener-type
193                           | spice-type
194                           | alcohol-type
195                           ) *( ";" parameter )
196         milk-type       = ( "Cream" | "Half-and-half" | "Whole-milk"
197                           | "Part-Skim" | "Skim" | "Non-Dairy" )
198         syrup-type      = ( "Vanilla" | "Almond" | "Raspberry"
199                           | "Chocolate" )
200         alcohol-type    = ( "Whisky" | "Rum" | "Kahlua" | "Aquavit" )
201
202 2.2.3 Omitted Header Fields
203
204    No options were given for decaffeinated coffee. What's the point?
205
206 2.3 HTCPCP return codes
207
208    Normal HTTP return codes are used to indicate difficulties of the
209    HTCPCP server. This section identifies special interpretations and
210    new return codes.
211
212 2.3.1 406 Not Acceptable
213
214    This return code is normally interpreted as "The resource identified
215    by the request is only capable of generating response entities which
216    have content characteristics not acceptable according to the accept
217    headers sent in the request. In HTCPCP, this response code MAY be
218    returned if the operator of the coffee pot cannot comply with the
219    Accept-Addition request. Unless the request was a HEAD request, the
220    response SHOULD include an entity containing a list of available
221    coffee additions.
222
223
224
225
226 Masinter                     Informational                      [Page 4]
227 \f
228 RFC 2324                       HTCPCP/1.0                   1 April 1998
229
230
231    In practice, most automated coffee pots cannot currently provide
232    additions.
233
234 2.3.2 418 I'm a teapot
235
236    Any attempt to brew coffee with a teapot should result in the error
237    code "418 I'm a teapot". The resulting entity body MAY be short and
238    stout.
239
240 3. The "coffee" URI scheme
241
242    Because coffee is international, there are international coffee URI
243    schemes.  All coffee URL schemes are written with URL encoding of the
244    UTF-8 encoding of the characters that spell the word for "coffee" in
245    any of 29 languages, following the conventions for
246    internationalization in URIs [URLI18N].
247
248 coffee-url  =  coffee-scheme ":" [ "//" host ]
249                 ["/" pot-designator ] ["?" additions-list ]
250
251 coffee-scheme = ( "koffie"                      ; Afrikaans, Dutch
252                   | "q%C3%A6hv%C3%A6"          ; Azerbaijani
253                   | "%D9%82%D9%87%D9%88%D8%A9" ; Arabic
254                | "akeita"                   ; Basque
255                | "koffee"                   ; Bengali
256                | "kahva"                    ; Bosnian
257                | "kafe"                     ; Bulgarian, Czech
258                | "caf%C3%E8"                ; Catalan, French, Galician
259                   | "%E5%92%96%E5%95%A1"       ; Chinese
260                   | "kava"                     ; Croatian
261                | "k%C3%A1va                 ; Czech
262                | "kaffe"                    ; Danish, Norwegian, Swedish
263                | "coffee"                   ; English
264                | "kafo"                     ; Esperanto
265                   | "kohv"                     ; Estonian
266                | "kahvi"                    ; Finnish
267                | "%4Baffee"                 ; German
268                | "%CE%BA%CE%B1%CF%86%CE%AD" ; Greek
269                | "%E0%A4%95%E0%A5%8C%E0%A4%AB%E0%A5%80" ; Hindi
270                | "%E3%82%B3%E3%83%BC%E3%83%92%E3%83%BC" ; Japanese
271                | "%EC%BB%A4%ED%94%BC"       ; Korean
272                | "%D0%BA%D0%BE%D1%84%D0%B5" ; Russian
273                | "%E0%B8%81%E0%B8%B2%E0%B9%81%E0%B8%9F" ; Thai
274                )
275
276    pot-designator = "pot-" integer  ; for machines with multiple pots
277    additions-list = #( addition )
278
279
280
281
282 Masinter                     Informational                      [Page 5]
283 \f
284 RFC 2324                       HTCPCP/1.0                   1 April 1998
285
286
287    All alternative coffee-scheme forms are equivalent.  However, the use
288    of coffee-scheme in various languages MAY be interpreted as an
289    indication of the kind of coffee produced by the coffee pot.  Note
290    that while URL scheme names are case-independent, capitalization is
291    important for German and thus the initial "K" must be encoded.
292
293 4. The "message/coffeepot" media type
294
295    The entity body of a POST or BREW request MUST be of Content-Type
296    "message/coffeepot". Since most of the information for controlling
297    the coffee pot is conveyed by the additional headers, the content of
298    "message/coffeepot" contains only a coffee-message-body:
299
300    coffee-message-body = "start" | "stop"
301
302 5. Operational constraints
303
304    This section lays out some of the operational issues with deployment
305    of HTCPCP ubiquitously.
306
307 5.1 Timing Considerations
308
309    A robust quality of service is required between the coffee pot user
310    and the coffee pot service.  Coffee pots SHOULD use the Network Time
311    Protocol [NTP] to synchronize their clocks to a globally accurate
312    time standard.
313
314    Telerobotics has been an expensive technology. However, with the
315    advent of the Cambridge Coffee Pot [CAM], the use of the web (rather
316    than SNMP) for remote system monitoring and management has been
317    proven.  Additional coffee pot maintenance tasks might be
318    accomplished by remote robotics.
319
320    Web data is normally static. Therefore to save data transmission and
321    time, Web browser programs store each Web page retrieved by a user on
322    the user's computer. Thus, if the user wants to return to that page,
323    it is now stored locally and does not need to be requested again from
324    the server. An image used for robot control or for monitoring a
325    changing scene is dynamic. A fresh version needs to be retrieved from
326    the server each time it is accessed.
327
328 5.2 Crossing firewalls
329
330    In most organizations HTTP traffic crosses firewalls fairly easily.
331    Modern coffee pots do not use fire. However, a "firewall" is useful
332    for protection of any source from any manner of heat, and not just
333    fire. Every home computer network SHOULD be protected by a firewall
334    from sources of heat. However, remote control of coffee pots is
335
336
337
338 Masinter                     Informational                      [Page 6]
339 \f
340 RFC 2324                       HTCPCP/1.0                   1 April 1998
341
342
343    important from outside the home. Thus, it is important that HTCPCP
344    cross firewalls easily.
345
346    By basing HTCPCP on HTTP and using port 80, it will get all of HTTP's
347    firewall-crossing virtues. Of course, the home firewalls will require
348    reconfiguration or new versions in order to accommodate HTCPCP-
349    specific methods, headers and trailers, but such upgrades will be
350    easily accommodated. Most home network system administrators drink
351    coffee, and are willing to accommodate the needs of tunnelling
352    HTCPCP.
353
354 6. System management considerations
355
356    Coffee pot monitoring using HTTP protocols has been an early
357    application of the web.  In the earliest instance, coffee pot
358    monitoring was an early (and appropriate) use of ATM networks [CAM].
359
360    The traditional technique [CAM] was to attach a frame-grabber to a
361    video camera, and feed the images to a web server. This was an
362    appropriate application of ATM networks. In this coffee pot
363    installation, the Trojan Room of Cambridge University laboratories
364    was used to give a web interface to monitor a common coffee pot.  of
365    us involved in related research and, being poor, impoverished
366    academics, we only had one coffee filter machine between us, which
367    lived in the corridor just outside the Trojan Room. However, being
368    highly dedicated and hard-working academics, we got through a lot of
369    coffee, and when a fresh pot was brewed, it often didn't last long.
370
371    This service was created as the first application to use a new RPC
372    mechanism designed in the Cambridge Computer Laboratory - MSRPC2. It
373    runs over MSNL (Multi-Service Network Layer) - a network layer
374    protocol designed for ATM networks.
375
376    Coffee pots on the Internet may be managed using the Coffee Pot MIB
377    [CPMIB].
378
379 7. Security Considerations
380
381    Anyone who gets in between me and my morning coffee should be
382    insecure.
383
384    Unmoderated access to unprotected coffee pots from Internet users
385    might lead to several kinds of "denial of coffee service" attacks.
386    The improper use of filtration devices might admit trojan grounds.
387    Filtration is not a good virus protection method.
388
389
390
391
392
393
394 Masinter                     Informational                      [Page 7]
395 \f
396 RFC 2324                       HTCPCP/1.0                   1 April 1998
397
398
399    Putting coffee grounds into Internet plumbing may result in clogged
400    plumbing, which would entail the services of an Internet Plumber
401    [PLUMB], who would, in turn, require an Internet Plumber's Helper.
402
403    Access authentication will be discussed in a separate memo.
404
405 8. Acknowledgements
406
407    Many thanks to the many contributors to this standard, including Roy
408    Fielding, Mark Day, Keith Moore, Carl Uno-Manros, Michael Slavitch,
409    and Martin Duerst.  The inspiration of the Prancing Pony, the CMU
410    Coke Machine, the Cambridge Coffee Pot, the Internet Toaster, and
411    other computer controlled remote devices have led to this valuable
412    creation.
413
414 9. References
415
416    [RFC2068] Fielding, R., Gettys, J., Mogul, J., Frystyk, H., and T.
417    Berners-Lee, "Hypertext Transfer Protocol -- HTTP/1.1", RFC 2068,
418    January 1997.
419
420    [RFC2186] Wessels, D., and K. Claffy, "Internet Cache Protocol (ICP),
421    version 2," RFC 2186, September 1997
422
423    [CPMIB] Slavitch, M., "Definitions of Managed Objects for Drip-Type
424    Heated Beverage Hardware Devices using SMIv2", RFC 2325, 1 April
425    1998.
426
427    [HTSVMP] Q. Stafford-Fraser, "Hyper Text Sandwich Van Monitoring
428    Protocol, Version 3.2". In preparation.
429
430    [RFC2295] Holtman, K., and A. Mutz, "Transparent Content Negotiation
431    in HTTP", RFC 2295, March 1998.
432
433    [SAFE] K. Holtman. "The Safe Response Header Field", September 1997.
434
435    [CAM] "The Trojan Room Coffee Machine", D. Gordon and M. Johnson,
436    University of Cambridge Computer Lab,
437    <http://www.cl.cam.ac.uk/coffee/coffee.html>
438
439    [CBIO] "The Trojan Room Coffee Pot, a (non-technical) biography", Q.
440    Stafford-Fraser, University of Cambridge Computer Lab,
441    <http://www.cl.cam.ac.uk/coffee/qsf/coffee.html>.
442
443    [RFC2235] Zakon, R., "Hobbes' Internet Timeline", FYI 32, RFC 2230,
444    November 1997.  See also
445    <http://www.internode.com.au/images/toaster2.jpg>
446
447
448
449
450 Masinter                     Informational                      [Page 8]
451 \f
452 RFC 2324                       HTCPCP/1.0                   1 April 1998
453
454
455    [NTP] Mills, D., "Network Time Protocol (Version 3) Specification,
456    Implementation and Analysis", RFC 1305, March 1992.
457
458    [URLI18N] Masinter, L., "Using UTF8 for non-ASCII Characters in
459    Extended URIs" Work in Progress.
460
461    [PLUMB] B. Metcalfe, "Internet Plumber of the Year: Jim Gettys",
462    Infoworld, February 2, 1998.
463
464    [COKE] D. Nichols, "Coke machine history", C. Everhart, "Interesting
465    uses of networking", <http://www-
466    cse.ucsd.edu/users/bsy/coke.history.txt>.
467
468 10. Author's Address
469
470    Larry Masinter
471    Xerox Palo Alto Research Center
472    3333 Coyote Hill Road
473    Palo Alto, CA 94304
474
475    EMail: masinter@parc.xerox.com
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506 Masinter                     Informational                      [Page 9]
507 \f
508 RFC 2324                       HTCPCP/1.0                   1 April 1998
509
510
511 11.  Full Copyright Statement
512
513    Copyright (C) The Internet Society (1998).  All Rights Reserved.
514
515    This document and translations of it may be copied and furnished to
516    others, and derivative works that comment on or otherwise explain it
517    or assist in its implementation may be prepared, copied, published
518    and distributed, in whole or in part, without restriction of any
519    kind, provided that the above copyright notice and this paragraph are
520    included on all such copies and derivative works.  However, this
521    document itself may not be modified in any way, such as by removing
522    the copyright notice or references to the Internet Society or other
523    Internet organizations, except as needed for the purpose of
524    developing Internet standards in which case the procedures for
525    copyrights defined in the Internet Standards process must be
526    followed, or as required to translate it into languages other than
527    English.
528
529    The limited permissions granted above are perpetual and will not be
530    revoked by the Internet Society or its successors or assigns.
531
532    This document and the information contained herein is provided on an
533    "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
534    TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
535    BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
536    HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
537    MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562 Masinter                     Informational                     [Page 10]
563 \f