/[suikacvs]/webroot/www/2004/id/draft-kristol-http-extensions-00.txt
Suika

Contents of /webroot/www/2004/id/draft-kristol-http-extensions-00.txt

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Tue Jun 15 08:37:16 2004 UTC (20 years, 10 months ago) by wakaba
Branch: MAIN
CVS Tags: HEAD
File MIME type: text/plain
New

1 David M. Kristol
2 INTERNET DRAFT AT&T Bell Laboratories
3 <draft-kristol-http-extensions-00.txt>
4 January 1995 Expires July 1995
5
6
7 A Proposed Extension Mechanism for HTTP
8
9
10
11 Status of this Memo
12
13 This document is an Internet-Draft. Internet-Drafts are
14 working documents of the Internet Engineering Task Force
15 (IETF), its areas, and its working groups. Note that other
16 groups may also distribute working documents as Internet-
17 Drafts.
18
19 Internet-Drafts are draft documents valid for a maximum of six
20 months and may be updated, replaced, or obsoleted by other
21 documents at any time. It is inappropriate to use Internet-
22 Drafts as reference material or to cite them other than as
23 ``work in progress.''
24
25 To learn the current status of any Internet-Draft, please
26 check the ``1id-abstracts.txt'' listing contained in the
27 Internet- Drafts Shadow Directories on ftp.is.co.za (Africa),
28 nic.nordu.net (Europe), munnari.oz.au (Pacific Rim),
29 ds.internic.net (US East Coast), or ftp.isi.edu (US West
30 Coast).
31
32 This is author's draft 2.9. The previously available author's
33 draft was 1.3.
34
35
36 1. ABSTRACT
37
38 HTTP, the hypertext transfer protocol, underpins the World-Wide Web
39 (WWW). As the Web has grown, pressures have mounted to add a variety of
40 facilities to HTTP. Some of the new features that have been proposed
41 include: keep-alive, packetized data, compression, security, and
42 payment. This memo offers an alternative: well-defined hooks in a
43 slightly modified HTTP framework that make it possible to add extensions
44 to the basic protocol in a way that will retain compatible behavior
45 between clients and servers, yet allow both clients and servers to
46 discover and use extended capabilities. The goal is to use HTTP as just
47 a transport mechanism, leaving other, higher-level (session) activities
48 to extensions.
49
50
51 2. MOTIVATION
52
53 One virtue of HTTP is that it is easy to modify: just add more request
54 or response headers. Unrecognized headers will be ignored by agents
55 (client or server) that don't understand them. Why is this approach
56 unacceptable? The following paragraphs will attempt to justify a
57
58
59
60 Kristol [Page 1]
61
62
63
64
65
66
67
68 INTERNET DRAFT Proposed HTTP Extension Mechanism January 1995
69
70
71
72 different approach.
73
74 2.1 Generality
75
76 A common, well-defined framework by which to introduce extensions
77 reduces the danger of uncontrolled proliferation of incompatible
78 extensions. Vendors that want to add extensions can do so in a
79 predictable way. Client and server software will be better able to
80 predict what kinds of headers they will encounter.
81
82 2.2 Simplicity and Modularity
83
84 The server and client architectures should be kept simple. If
85 extensions can be recognized easily, it becomes possible to posit the
86 following architecture. A client (server) comprises a core part.
87 Extensions are handed off to an extensions manager, which dispatches
88 extension requests to the appropriate handler, such as a security
89 manager, payment manager, etc. If the interface between the core part
90 and the extensions manager, and between the extensions manager and the
91 individual extension managers, is well-defined, the core part of a
92 client (server) can be quite ignorant of what is actually being done by
93 the various extensions. Thus this architecture leads to a highly
94 modular design into which it is possible to ``plug'' new extensions,
95 while the core part remains simple. Vendors of extensions could supply
96 matched plug-in parts for them to client and server implementors, to
97 incorporate them in their products.
98
99 2.3 Recognizable Extensions
100
101 The scheme proposed here makes it easy to identify requests for
102 extensions quickly. Requests for, or acceptance of, extensions is
103 signaled by Extension: request/response headers. Because they are
104 easily identified, a caching server can recognize headers for extensions
105 and store them as part of the cached information.
106
107 (Caching requires further consideration. It may be necessary for
108 caching servers not to cache information that was obtained using
109 extensions, since those extensions often entail security or payment.)
110
111 Using the HTTP version number to determine what extensions are present
112 is a bad idea. Extensions are often disjoint, and clients and servers
113 should be able to ``mix and match'' the ones they can support. The HTTP
114 version number is too crude a discriminant and should be reserved for
115 true changes to the base protocol. The extension mechanism proposed
116 here merely uses HTTP for transport.
117
118
119
120
121
122
123
124
125
126 Kristol [Page 2]
127
128
129
130
131
132
133
134 INTERNET DRAFT Proposed HTTP Extension Mechanism January 1995
135
136
137
138 2.4 Who's in Charge?
139
140 HTTP headers are likely to require approval from IANA. Thus, using
141 multiple headers for different extensions may impede new applications of
142 the World-Wide Web. It is easier to get two headers approved that
143 enable a whole range of extensions, and it carves out a hunk of name
144 space that can be controlled separately, possibly by W3C (World-Wide Web
145 Consortium).
146
147 2.5 Wrapping Better Than MIME
148
149 Wrapping, described below, has capabilities that MIME cannot supply.
150 Specifically, security may require that the actual request be obscured.
151 The WRAPPED method in this proposal makes it possible to encrypt the
152 actual request. A snooper would see only the WRAPPED request method and
153 the extension header (with, presumably, enough information to describe
154 how to decrypt the actual request).
155
156
157 3. CONCEPTS
158
159 The proposed extension mechanism has two fundamental concepts: wrapping
160 and negotiation.
161
162 3.1 Wrapping
163
164 Wrapping implies that a core set of information has information added
165 before and after it. In some cases the information added may comprise
166 just headers. The core information may itself be changed as well, such
167 as when it is encrypted. The information added as the pre-wrapper must
168 convey enough information to the recipient so it can unwrap the
169 information. Either a client or server can do the wrapping, although I
170 assume that the server more often does the wrapping.
171
172 3.2 Negotiation
173
174 Before a sender wraps information, it must be sure the receiver can
175 unwrap it. Thus the two parties must negotiate what kind of wrapping is
176 desirable. Therefore a (prospective) receiver (initiator) tells a
177 sender (responder) what forms of wrapping it accepts, and whether they
178 are acceptable always, or sometimes. The sender responds with a
179 suitably wrapped response. ``One-of'' wrappings must always be used,
180 but the sender can choose at will from a group of such wrappings.
181 ``Sometimes'' wrappings may be used at the discretion of the responder.
182
183 3.3 Recursion
184
185 Wrappings can be recursive. To give but one example, a core message
186 might be wrapped thus: packetize(security(payment(core))). The
187 notation implies that, given a core message, first a payment wrapping is
188 applied, followed by a security wrapper, followed by packetization. The
189
190
191
192 Kristol [Page 3]
193
194
195
196
197
198
199
200 INTERNET DRAFT Proposed HTTP Extension Mechanism January 1995
201
202
203
204 receiver must unwrap the message from outside in, i.e., packetization
205 first.
206
207
208 4. NOTATIONAL CONVENTIONS
209
210 This proposal uses the notational conventions of the (draft)
211 specification, Hypertext Transfer Protocol - HTTP/1.0, Berners-Lee,
212 Fielding, Frystyk Nielsen.
213
214
215 5. EXTENSIONS TO HTTP 1.0
216
217 The proposed extension mechanism requires small changes in the existing
218 HTTP, to add two methods and two request headers.
219
220 5.1 Methods
221
222 5.1.1 GETEXT get extensions
223 The HEAD method in HTTP only provides a limited amount of information
224 about how the server would respond to a GET request. GETEXT provides
225 information about how the server would respond (at least for extensions)
226 for any method.
227
228 <getext> ::= "GETEXT" <url> "HTTP/1.0"
229 <url> ::= *
230 / <path part of URL>
231
232 A client sends a request with the GETEXT method to a server to learn
233 what extensions the server supports.
234
235 The GETEXT method may have an optional Extension: request header with
236 the following form:
237
238 <getext-hdr> ::= "Extension:" "HTTP/Method" "method=" <method>
239 <method> ::= "GET" / "PUT" / "POST" / ...
240
241 Semantics
242
243 The server reports the extensions as response headers, identical to the
244 request headers that are described in the next section, that apply.
245 There are four cases, depending on whether an explicit <url> is present
246 and whether an Extension: header is present. In each case the result is
247 the intersection set of extensions for the method(s) and URL(s)
248 specified by the GETEXT request.
249
250 <url> ::= *, no Extension: request header
251 The server returns the set of Extension: response headers that
252 apply to any URL and any method on the server.
253
254
255
256
257
258 Kristol [Page 4]
259
260
261
262
263
264
265
266 INTERNET DRAFT Proposed HTTP Extension Mechanism January 1995
267
268
269
270 <url> ::= *, Extension: request header present
271 The server returns the set of Extension: response headers that
272 would apply if the server got a request comprising the
273 <method> in the Extension: request header and any URL.
274
275 <url> ::= URL, no Extension: request header
276 The server returns the set of Extension: response headers that
277 would apply if the server got a request comprising any
278 acceptable method applied to the selected URL.
279
280 <url> ::= URL, Extension: request header present
281 The server returns the set of Extension: response headers that
282 would apply if the server got a request comprising the
283 <method> in the Extension: request header and the specified
284 URL.
285
286 5.2.1 WRAPPED wrapped request
287
288 <wrapped> ::= "WRAPPED" "*" "HTTP/1.0"
289
290 A client sends a request with this method to tell a server that the
291 request is wrapped. The request headers (next section) specify exactly
292 how the request is wrapped. The server must peel the wrappings one
293 layer at a time until it encounters a normal request, which it can then
294 process. The value of what would normally be the URL field, shown above
295 as *, is ignored.
296
297 5.3 Request Headers
298
299 Two new request headers specify extensions. Their syntax and semantics
300 are given below.
301
302 5.3.1 Extension: Header
303
304 <extension> ::= "Extension:" <cat-class> [<av-pairs>]
305 <cat-class> ::= <category> "/" <class>
306 <category> ::= <alpha-numeric string>
307 ; kind of generic extension
308 <class> ::= <alpha-numeric string>
309 ; class within generic extension
310 <av-pairs> ::= <av-pair> [";" <av-pair>]
311 <av-pair> ::= <attr> "=" <value>
312 <attr> ::= <alpha-numeric string>
313 <value> ::= <alpha-numeric string>
314
315 The Extension: request header may wrap, RFC822-style, onto multiple
316 lines.
317
318
319
320
321
322
323
324 Kristol [Page 5]
325
326
327
328
329
330
331
332 INTERNET DRAFT Proposed HTTP Extension Mechanism January 1995
333
334
335
336 Semantics
337
338 <category> describes the generic extension, for example security,
339 payment. (Should the list of extensions be controlled by W3C?) A
340 responder that receives an unrecognized <category> responds with an
341 error if the <av-pair> required=oneof is present and ignores the header
342 otherwise.
343
344 <class> specifies a member of the <category>. For example, <category>
345 payment might have <class>s Visa, MasterCard, Ecash, etc. If a
346 <category> has no <class>s, * must be used as the <class>.
347
348 Attribute-value pairs (<av-pairs>) are optional. The only attribute
349 that is defined for all <category>s is required, with possible values
350 oneof and sometimes. If the required attribute is present for an
351 Extension: header, it must be part of the first <av-pair>.
352
353 The algorithm for choosing among Extension: headers is described in
354 NEGOTIATION, below.
355
356 5.4.1 Extension-Order: Header
357
358 <extension-order> ::= "Extension-Order:" 1#<cat-class>
359
360 The Extension-Order: header provides a way for a client or server to
361 specify the order in which extensions must be applied. (MIME headers
362 are unordered by definition.)
363
364 5.5 Wrapped Response
365
366 A wrapped response comprises a status code of 207 (Wrapped), a single
367 Extension: response header that describes the outermost wrapping, and a
368 blank line. The body of the response comprises the wrapped response.
369 The wrapping must be defined in such a way that the body can be
370 unwrapped to produce a new response, complete with status line, response
371 header line(s), blank line, and new body. The specifics of that
372 wrapping are outside the scope of this document and are specific to a
373 given extension. The resulting inner response may also be a wrapped
374 response, in which case the unwrapping occurs recursively.
375
376 A response code of 409 by a server denotes a Wrapping Required response.
377 The response headers specify both the type and order of wrapping that
378 the server requires from the client. (Note that in this case the server
379 acts as an initiator and should provide required= <av-pair>s for the
380 Extension: response headers it returns.)
381
382 5.5.1 Response Headers An Extension: response header is identical in
383 form and content to a corresponding request header. A responder's
384 header does not contain a required= <av-pair>, because the presence of
385 the Extension: header means the extension request has been honored,
386 whether it was optional or mandatory.
387
388
389
390 Kristol [Page 6]
391
392
393
394
395
396
397
398 INTERNET DRAFT Proposed HTTP Extension Mechanism January 1995
399
400
401
402 6. NEGOTIATION
403
404 This section describes in more detail the negotiation process. It
405 describes the roles of initiators and responders and how they should use
406 and respond to Extension: and Extension-Order: headers. Either clients
407 or servers may be initiators or responders.
408
409 [This first attempt will undoubtedly be mushy.]
410
411 6.1 Initiators
412
413 An initiator informs a responder of extension capabilities that are
414 either mandatory or optional to use. Each capability is described by an
415 Extension: (request or response) header. Mandatory extensions must have
416 required=oneof as the first <av-pair> of the header. If no required=
417 <av-pair> is present in an initiator's header, the default is
418 required=sometimes.
419
420 An initiator can advertise to a responder many <class>s for a particular
421 <category>, and many extension <category>s. Based on the negotiation
422 selection algorithm (below), a responder may (and sometimes must) choose
423 among them. How the initiator chooses which extensions to advertise is
424 outside the scope of this proposal.
425
426 6.2 Responders
427
428 A responder informs an initiator of which extensions it has selected.
429 If the initiator has specified multiple <class>s for a particular
430 <category>, the responder must choose to honor either one or none of the
431 choices. When the initiator has specified mandatory extensions
432 (required=oneof) for a <category>, the responder must choose one. For
433 optional extensions (required=sometimes), the responder informs the
434 initiator of which ones, if any, it has chosen to use.
435
436 What happens when a responder cannot honor a mandatory extension depends
437 on whether it is a client or server. A client responder would typically
438 inform a user that it cannot complete a request because it lacks some
439 capability that the server requires (such as authentication or a
440 suitable payment method). A server responder would return an error
441 response code to the client, preferably with an informative HTML message
442 for the client to display to describe the failure.
443
444 6.3 Negotiation Selection Algorithm
445
446 A responder uses the negotiation selection algorithm to choose among
447 possible <class>s in a given <category>, and to define the order in
448 which extensions in different <category>s are applied.
449
450 For expository purposes, assume each <cat-class> part of an Extension-
451 Order: header is assigned an integer index from 1 (first) to N (last),
452 based on its lexical order in the header. If there is no Extension-
453
454
455
456 Kristol [Page 7]
457
458
459
460
461
462
463
464 INTERNET DRAFT Proposed HTTP Extension Mechanism January 1995
465
466
467
468 Order: header, the indexes are assigned arbitrarily by the responder.
469 Note that if there is only one Extension: header, the Extension-Order:
470 header is redundant.
471
472 6.3.1 Selection All the extensions in the same <category> (call them
473 category-options) are treated as a group. If any category-option in the
474 group has the <av-pair> required=oneof (a mandatory category), then any
475 category-option in the group that does not have required=oneof is
476 discarded. The responder then considers each remaining category-option
477 in turn, choosing the one it prefers from the group. Note that at this
478 point all the members of the group must have the same required= value,
479 either oneof or sometimes. (How the responder chooses the one ``it
480 prefers'' is an implementation issue, outside the scope of this
481 proposal.)
482
483 If the responder cannot support any of the category-options for a
484 mandatory category, it responds with an error, as indicated earlier.
485 For an optional category, if the responder cannot support, or chooses
486 not to honor, an extension, the responder simply does not apply the
487 extension.
488
489 6.3.2 Order After the responder has identified the extensions it will
490 honor, based on the initiator's Extension: headers, it applies them in
491 the order of the index numbers of the honored <cat-class>s.
492
493 6.3.3 Exceptional Conditions
494
495 1. If an Extension-Order: header is present, any Extension: header to
496 be considered in the selection process must have its <cat-class>
497 listed by the Extension-Order: header.
498
499 2. If more than one Exception: header has the same <cat-class>, the
500 responder should reject the request.
501
502 3. If a <cat-class> appears in an Exception-Order: header, and there
503 is no Exception: header with the same <cat-class>, the responder
504 should behave as though the <cat-class> were omitted from the
505 Exception-Order: header.
506
507
508 7. EXAMPLE 1: SIMPLE AUTHENTICATION
509
510 The Basic authentication scheme can be recast in the framework of the
511 HTTP extension mechanism. Assume the requested (local) URL on the
512 server is /foo/bar.
513
514
515
516
517
518
519
520
521
522 Kristol [Page 8]
523
524
525
526
527
528
529
530 INTERNET DRAFT Proposed HTTP Extension Mechanism January 1995
531
532
533
534 7.1 Client -> Server
535
536 GET /foo/bar HTTP/1.0
537 Accept: text/html, ...
538 [blank line]
539
540 7.2 Server -> Client [Server is initiator]
541
542 HTTP/1.0 409 Wrapping Required
543 Date: Wed, 28 Dec 1994 10:59:13 GMT
544 Server: HTD/0.9
545 MIME-version: 1.0
546 Extension: Security/Basic required=oneof;Realm="Demonstration"
547
548 7.3 Client -> Server [Client is responder]
549
550 WRAPPED * HTTP/1.0
551 Extension: Security/Basic data=ZG1rOnBhc3N3b3Jk
552 [blank line]
553 ====
554 GET /foo/bar HTTP/1.0
555 Accept: text/html, ...
556 ====
557
558 (Note: pretend ==== is used to ``wrap'' the inner request.)
559
560 7.4 Server -> Client
561
562 HTTP/1.0 200 OK
563 Date: Wed, 28 Dec 1994 10:59:15 GMT
564 Server: HTD/0.9
565 MIME-version: 1.0
566 Content-type: text/html
567 Last-modified: Thu, 17 Nov 1994 19:35:21 GMT
568 Content-length: 3729
569
570 [body]
571
572
573 8. EXAMPLE 2: PAYMENT AND ENCRYPTION
574
575 This more extended example demonstrates how the extension mechanism can
576 be used to support both security and payment. In the example, the
577 payment manager relies on an existing security manager to provide the
578 encryption that secures a credit card number.
579
580
581
582
583
584
585
586
587
588 Kristol [Page 9]
589
590
591
592
593
594
595
596 INTERNET DRAFT Proposed HTTP Extension Mechanism January 1995
597
598
599
600 8.1 Client -> Server
601
602 GET /foo/bar HTTP/1.0
603 Accept: text/html, ...
604 [blank line]
605
606 8.2 Server -> Client [Server is initiator]
607
608 The server requires both payment and security (encryption). The payment
609 information must be supplied first, followed by the encryption. Note
610 that there is no need for an actual ``wrapping'' by the payment piece.
611
612 HTTP/1.0 409 Wrapping Required
613 Date: Wed, 28 Dec 1994 10:59:13 GMT
614 Server: HTD/0.9
615 MIME-version: 1.0
616 Extension: Security/SimpleDES required=oneof;
617 keyname=OpenSesame; nonce=873955
618 Extension: Security/SHTTP required=oneof;
619 (S-HTTP parameters)
620 Extension: Payment/MasterCharge required=oneof;
621 cost=2; units=USD; mult=0
622 Extension: Payment/GreenCard required=oneof;
623 cost=2; units=USD; mult=0
624 Extension: Payment/American_Excess required=oneof;
625 cost=25; units=USD; mult=-1
626 Extension-Order: Security/SHTTP,
627 Security/SimpleDES,
628 Payment/MasterCharge,
629 Payment/American_Excess,
630 Payment/GreenCard
631 [blank line]
632
633 8.3 Client -> Server [Client is responder]
634
635 Client provides server with payment information. It chooses (presumably
636 with the user's help) which of the three payment methods, MasterCharge,
637 GreenCard, American_Excess, to use. It also chooses between the two
638 security methods. Note that the ``wrapping'' for the payment part just
639 comprises adding a header. The security piece does wrap the request,
640 however.
641
642
643
644
645
646
647
648
649
650
651
652
653
654 Kristol [Page 10]
655
656
657
658
659
660
661
662 INTERNET DRAFT Proposed HTTP Extension Mechanism January 1995
663
664
665
666 WRAPPED * HTTP/1.0
667 Extension: Security/SimpleDES keyname=OpenSesame; nonce=873955
668 [blank line]
669 ====
670 GET /foo/bar HTTP/1.0
671 Accept: text/html, ...
672 Extension: Payment/GreenCard cost=2; units=USD; mult=0;
673 cardno=11112223333444
674 ====
675
676 Pretend ==== is used to ``wrap'' the inner request, and that the inner
677 request is encrypted using simple DES with a key named OpenSesame, a
678 shared secret between the client and server. The wrapping could just as
679 well use MIME multipart syntax, but that's a decision to be made by the
680 particular extension manager.
681
682 8.4 Server -> Client
683
684 Server accepts payment and returns a receipt to the client. The server
685 could, optionally, wrap the response to protect the receipt.
686
687 HTTP/1.0 200 OK
688 Date: Wed, 28 Dec 1994 11:01:56 GMT
689 Server: HTD/0.9
690 MIME-version: 1.0
691 Content-type: text/html
692 Last-modified: Thu, 17 Nov 1994 19:35:21 GMT
693 Content-length: 3729
694 Extension: Payment/GreenCard cost=2; units=USD; mult=0;
695 Receipt="You paid $2. Thank you for using AT&T."
696
697 [body]
698
699
700 9. EXAMPLE 3: GETEXT
701
702 This example shows how the GETEXT method might be used.
703
704 9.1 Client -> Server
705
706 GETEXT /foo/bar HTTP/1.0
707 Extension: HTTP/Method method=GET
708 [blank line]
709
710 9.2 Server -> Client
711
712
713
714
715
716
717
718
719
720 Kristol [Page 11]
721
722
723
724
725
726
727
728 INTERNET DRAFT Proposed HTTP Extension Mechanism January 1995
729
730
731
732 HTTP/1.0 200 OK
733 Date: Wed, 28 Dec 1994 10:59:13 GMT
734 Server: HTD/0.9
735 MIME-version: 1.0
736 Extension: Security/SimpleDES required=oneof;
737 keyname=OpenSesame; nonce=873955
738 Extension: Security/SHTTP required=oneof;
739 (S-HTTP parameters)
740 Extension: Payment/MasterCharge required=oneof;
741 cost=2; units=USD; mult=0
742 Extension: Payment/GreenCard required=oneof;
743 cost=2; units=USD; mult=0
744 Extension: Payment/American_Excess required=oneof;
745 cost=25; units=USD; mult=-1
746 Extension-Order: Security/SHTTP,
747 Security/SimpleDES,
748 Payment/MasterCharge,
749 Payment/American_Excess,
750 Payment/GreenCard
751 [blank line]
752
753
754 10. <category> HTTP Extensions
755
756 The proposed mechanism can be used for extensions to HTTP itself, as
757 well as to what might be considered ``outboard'' matters, like security
758 and payment. Such extensions would comprise the <category> HTTP. Two
759 extensions to HTTP/1.0 have been frequently discussed. Both can be
760 accommodated by this proposed mechanism.
761
762 10.1 Packetization HTTP/Packetize
763
764 Packetization divides a message into hunks of not more than a fixed
765 size. It is well-suited for transmitting the output of a script for
766 which the total size of the message is unknown when the script begins to
767 run.
768
769 <packet-hdr> ::= "Extension:" "HTTP/Packetize"
770 "required=sometimes" [<size>]
771 <size> ::= ";" "size=" <positive, non-zero decimal number>
772
773 The initiator (usually a client) announces its willingness to accept
774 responses in packetized form, with packets no larger than <size>, but
775 packetization is optional. The initiator must supply <size>.
776
777 The responder (usually a server) announces that it plans to use
778 packetization in its response by returning a similar Extension: header,
779 omitting the <size> and required=.
780
781 I have omitted details of what a packetized response looks like. A
782 typical implementation produces packets that comprise a decimal byte
783
784
785
786 Kristol [Page 12]
787
788
789
790
791
792
793
794 INTERNET DRAFT Proposed HTTP Extension Mechanism January 1995
795
796
797
798 count, followed by that many bytes (line terminators included). A zero
799 or negative count signifies end of data.
800
801 10.2 Keep-connection HTTP/KeepConnection
802
803 One of the performance defects of HTTP is that clients often open many
804 connections to the same server to get images for a document they just
805 fetched. Connections are expensive in time and resources. It would be
806 better to pass follow-up requests over an already-open connection.
807
808 <keep-conn> ::= "Extension:" "HTTP/KeepConnection"
809 "required=sometimes" [<timeout>]
810 <timeout> ::= ";" "timeout=" <timeout in seconds>
811
812 A client (initiator) would signal its ability and willingness to hold a
813 connection open by passing this request header. The <timeout> advises
814 the server how long it would like the connection held open.
815
816 A server (responder) would indicate it had honored the request by
817 returning the same header, minus the required= part. The server can
818 respond with a different <timeout> to say how long it plans to hold open
819 the connection, but that information is strictly advisory.
820
821 Note that, as a practical matter, HTTP/KeepConnection must be used with
822 HTTP/Packetize, because in some instances (e.g., output from scripts),
823 the server doesn't know how long its output to the client will be, and
824 it currently signals the end of data by closing the connection.
825 Packetization lets a server pass back data to a client in manageable
826 chunks, rather than buffer the entire response and send a correct
827 Content-length header.
828
829
830 11. ACKNOWLEDGEMENTS
831
832 Jeff Hostetler, Spyglass, Inc., originally suggested the idea of
833 ``wrapping'' to me.
834
835
836 12. AUTHOR'S ADDRESS
837
838 David M. Kristol
839 AT&T Bell Laboratories
840 600 Mountain Ave. Room 2A-227
841 Murray Hill, NJ 07974
842 Phone: (908) 582-2250
843 FAX: (908) 582-5809
844 Email: dmk@research.att.com
845
846
847
848
849
850
851
852 Kristol [Page 13]
853
854
855
856

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24