-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrfc2616.html
10023 lines (7248 loc) · 566 KB
/
rfc2616.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
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
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
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
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- saved from url=(0014)about:internet -->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="robots" content="index,follow">
<meta name="creator" content="rfchandler version 0.2">
<meta name="citation_author" content="R. Fielding">
<meta name="citation_author" content="J. Gettys">
<meta name="citation_author" content="J. Mogul">
<meta name="citation_author" content="H. Frystyk">
<meta name="citation_author" content="L. Masinter">
<meta name="citation_author" content="P. Leach">
<meta name="citation_author" content="T. Berners-Lee">
<meta name="citation_publication_date" content="June, 1999">
<meta name="citation_title" content="Hypertext Transfer Protocol -- HTTP/1.1 ">
<meta name="citation_doi" content="10.17487/RFC2616">
<meta name="citation_issn" content="2070-1721">
<meta name="citation_technical_report_number" content="rfc2616">
<meta name="citation_pdf_url" content="https://www.rfc-editor.org/rfc/pdfrfc/rfc2616.txt.pdf">
<title>RFC 2616: Hypertext Transfer Protocol -- HTTP/1.1 </title>
<style type="text/css">
@media only screen
and (min-width: 992px)
and (max-width: 1199px) {
body { font-size: 14pt; }
div.content { width: 96ex; margin: 0 auto; }
}
@media only screen
and (min-width: 768px)
and (max-width: 991px) {
body { font-size: 14pt; }
div.content { width: 96ex; margin: 0 auto; }
}
@media only screen
and (min-width: 480px)
and (max-width: 767px) {
body { font-size: 11pt; }
div.content { width: 96ex; margin: 0 auto; }
}
@media only screen
and (max-width: 479px) {
body { font-size: 8pt; }
div.content { width: 96ex; margin: 0 auto; }
}
@media only screen
and (min-device-width : 375px)
and (max-device-width : 667px) {
body { font-size: 9.5pt; }
div.content { width: 96ex; margin: 0; }
}
@media only screen
and (min-device-width: 1200px) {
body { font-size: 10pt; margin: 0 4em; }
div.content { width: 96ex; margin: 0; }
}
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
font-weight: bold;
/* line-height: 0pt; */
display: inline;
white-space: pre;
font-family: monospace;
font-size: 1em;
font-weight: bold;
}
pre {
font-size: 1em;
margin-top: 0px;
margin-bottom: 0px;
}
.pre {
white-space: pre;
font-family: monospace;
}
.header{
font-weight: bold;
}
.newpage {
page-break-before: always;
}
.invisible {
text-decoration: none;
color: white;
}
a.selflink {
color: black;
text-decoration: none;
}
@media print {
body {
font-family: monospace;
font-size: 10.5pt;
}
h1, h2, h3, h4, h5, h6 {
font-size: 1em;
}
a:link, a:visited {
color: inherit;
text-decoration: none;
}
.noprint {
display: none;
}
}
@media screen {
.grey, .grey a:link, .grey a:visited {
color: #777;
}
.docinfo {
background-color: #EEE;
}
.top {
border-top: 7px solid #EEE;
}
.bgwhite { background-color: white; }
.bgred { background-color: #F44; }
.bggrey { background-color: #666; }
.bgbrown { background-color: #840; }
.bgorange { background-color: #FA0; }
.bgyellow { background-color: #EE0; }
.bgmagenta{ background-color: #F4F; }
.bgblue { background-color: #66F; }
.bgcyan { background-color: #4DD; }
.bggreen { background-color: #4F4; }
.legend { font-size: 90%; }
.cplate { font-size: 70%; border: solid grey 1px; }
}
</style>
<!--[if IE]>
<style>
body {
font-size: 13px;
margin: 10px 10px;
}
</style>
<![endif]--> <script type="text/javascript"><!--
function addHeaderTags() {
var spans = document.getElementsByTagName("span");
for (var i=0; i < spans.length; i++) {
var elem = spans[i];
if (elem) {
var level = elem.getAttribute("class");
if (level == "h1" || level == "h2" || level == "h3" || level == "h4" || level == "h5" || level == "h6") {
elem.innerHTML = "<"+level+">"+elem.innerHTML+"</"+level+">";
}
}
}
}
var legend_html = "Colour legend:<br /> <table> <tr><td>Unknown:</td> <td><span class='cplate bgwhite'> </span></td></tr> <tr><td>Draft:</td> <td><span class='cplate bgred'> </span></td></tr> <tr><td>Informational:</td> <td><span class='cplate bgorange'> </span></td></tr> <tr><td>Experimental:</td> <td><span class='cplate bgyellow'> </span></td></tr> <tr><td>Best Common Practice:</td> <td><span class='cplate bgmagenta'> </span></td></tr> <tr><td>Proposed Standard:</td> <td><span class='cplate bgblue'> </span></td></tr> <tr><td>Draft Standard (old designation):</td> <td><span class='cplate bgcyan'> </span></td></tr> <tr><td>Internet Standard:</td> <td><span class='cplate bggreen'> </span></td></tr> <tr><td>Historic:</td> <td><span class='cplate bggrey'> </span></td></tr> <tr><td>Obsolete:</td> <td><span class='cplate bgbrown'> </span></td></tr> </table>";
function showElem(id) {
var elem = document.getElementById(id);
elem.innerHTML = eval(id+"_html");
elem.style.visibility='visible';
}
function hideElem(id) {
var elem = document.getElementById(id);
elem.style.visibility='hidden';
elem.innerHTML = "";
}
// -->
</script></head>
<body>
<span class="pre noprint docinfo">[<a href="https://www.rfc-editor.org/" title="RFC Editor">RFC Home</a>] [<a href="https://www.rfc-editor.org/rfc/rfc2616.txt">TEXT</a>|<a href="https://www.rfc-editor.org/rfc/pdfrfc/rfc2616.txt.pdf">PDF</a>|<a href="https://www.rfc-editor.org/rfc/rfc2616.ps">PS</a>|<a href="https://www.rfc-editor.org/rfc/rfc2616.pdf">PDF</a>|<a href="https://www.rfc-editor.org/rfc/rfc2616.html">HTML</a>] [<a href="https://datatracker.ietf.org/doc/rfc2616" title="IETF Datatracker information for this document">Tracker</a>] [<a href="https://datatracker.ietf.org/ipr/search/?rfc=2616&submit=rfc" title="IPR disclosures related to this document">IPR</a>] [<a class="boldtext" href="https://www.rfc-editor.org/errata/rfc2616" target="_blank">Errata</a>] [<a href="https://www.rfc-editor.org/info/rfc2616" title="Info page">Info page</a>] </span><br><span class="pre noprint docinfo"> </span><br><span class="pre noprint docinfo">Obsoleted by: <a href="https://www.rfc-editor.org/rfc/rfc7230" target="_blank">7230</a>, <a href="https://www.rfc-editor.org/rfc/rfc7231" target="_blank">7231</a>, <a href="https://www.rfc-editor.org/rfc/rfc7232" target="_blank">7232</a>, <a href="https://www.rfc-editor.org/rfc/rfc7233" target="_blank">7233</a>, <a href="https://www.rfc-editor.org/rfc/rfc7234" target="_blank">7234</a>, <a href="https://www.rfc-editor.org/rfc/rfc7235" target="_blank">7235</a> DRAFT STANDARD</span><br><span class="pre noprint docinfo">Updated by: <a href="https://www.rfc-editor.org/rfc/rfc2817" target="_blank">2817</a>, <a href="https://www.rfc-editor.org/rfc/rfc5785" target="_blank">5785</a>, <a href="https://www.rfc-editor.org/rfc/rfc6266" target="_blank">6266</a>, <a href="https://www.rfc-editor.org/rfc/rfc6585" target="_blank">6585</a> <span style="color: #C00;">Errata Exist</span></span><pre>Network Working Group R. Fielding
Request for Comments: 2616 UC Irvine
Obsoletes: <a href="https://www.rfc-editor.org/rfc/rfc2068">2068</a> J. Gettys
Category: Standards Track Compaq/W3C
J. Mogul
Compaq
H. Frystyk
W3C/MIT
L. Masinter
Xerox
P. Leach
Microsoft
T. Berners-Lee
W3C/MIT
June 1999
<span class="h1">Hypertext Transfer Protocol -- HTTP/1.1</span>
Status of this Memo
This document specifies an Internet standards track protocol for the
Internet community, and requests discussion and suggestions for
improvements. Please refer to the current edition of the "Internet
Official Protocol Standards" (STD 1) for the standardization state
and status of this protocol. Distribution of this memo is unlimited.
Copyright Notice
Copyright (C) The Internet Society (1999). All Rights Reserved.
Abstract
The Hypertext Transfer Protocol (HTTP) is an application-level
protocol for distributed, collaborative, hypermedia information
systems. It is a generic, stateless, protocol which can be used for
many tasks beyond its use for hypertext, such as name servers and
distributed object management systems, through extension of its
request methods, error codes and headers [<a href="https://www.rfc-editor.org/rfc/rfc2616#ref-47" title=""Hyper Text Coffee Pot Control Protocol (HTCPCP/1.0)"">47</a>]. A feature of HTTP is
the typing and negotiation of data representation, allowing systems
to be built independently of the data being transferred.
HTTP has been in use by the World-Wide Web global information
initiative since 1990. This specification defines the protocol
referred to as "HTTP/1.1", and is an update to <a href="https://www.rfc-editor.org/rfc/rfc2068">RFC 2068</a> [<a href="https://www.rfc-editor.org/rfc/rfc2616#ref-33" title=""Hypertext Transfer Protocol -- HTTP/1.1"">33</a>].
<span class="grey">Fielding, et al. Standards Track [Page 1]</span></pre>
<hr class="noprint"><!--NewPage--><pre class="newpage"><span id="page-2"></span>
<span class="grey"><a href="https://www.rfc-editor.org/rfc/rfc2616">RFC 2616</a> HTTP/1.1 June 1999</span>
Table of Contents
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-1">1</a> Introduction ...................................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-7">7</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-1.1">1.1</a> Purpose......................................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-7">7</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-1.2">1.2</a> Requirements .................................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-8">8</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-1.3">1.3</a> Terminology ..................................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-8">8</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-1.4">1.4</a> Overall Operation ...........................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-12">12</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-2">2</a> Notational Conventions and Generic Grammar ....................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-14">14</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-2.1">2.1</a> Augmented BNF ...............................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-14">14</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-2.2">2.2</a> Basic Rules .................................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-15">15</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-3">3</a> Protocol Parameters ...........................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-17">17</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-3.1">3.1</a> HTTP Version ................................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-17">17</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-3.2">3.2</a> Uniform Resource Identifiers ................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-18">18</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-3.2.1">3.2.1</a> General Syntax ...........................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-19">19</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-3.2.2">3.2.2</a> http URL .................................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-19">19</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-3.2.3">3.2.3</a> URI Comparison ...........................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-20">20</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-3.3">3.3</a> Date/Time Formats ...........................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-20">20</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-3.3.1">3.3.1</a> Full Date ................................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-20">20</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-3.3.2">3.3.2</a> Delta Seconds ............................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-21">21</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-3.4">3.4</a> Character Sets ..............................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-21">21</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-3.4.1">3.4.1</a> Missing Charset ..........................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-22">22</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-3.5">3.5</a> Content Codings .............................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-23">23</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-3.6">3.6</a> Transfer Codings ............................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-24">24</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-3.6.1">3.6.1</a> Chunked Transfer Coding ..................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-25">25</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-3.7">3.7</a> Media Types .................................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-26">26</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-3.7.1">3.7.1</a> Canonicalization and Text Defaults .......................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-27">27</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-3.7.2">3.7.2</a> Multipart Types ..........................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-27">27</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-3.8">3.8</a> Product Tokens ..............................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-28">28</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-3.9">3.9</a> Quality Values ..............................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-29">29</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-3.10">3.10</a> Language Tags ...............................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-29">29</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-3.11">3.11</a> Entity Tags .................................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-30">30</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-3.12">3.12</a> Range Units .................................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-30">30</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-4">4</a> HTTP Message ..................................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-31">31</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-4.1">4.1</a> Message Types ...............................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-31">31</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-4.2">4.2</a> Message Headers .............................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-31">31</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-4.3">4.3</a> Message Body ................................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-32">32</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-4.4">4.4</a> Message Length ..............................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-33">33</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-4.5">4.5</a> General Header Fields .......................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-34">34</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-5">5</a> Request .......................................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-35">35</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-5.1">5.1</a> Request-Line ................................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-35">35</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-5.1.1">5.1.1</a> Method ...................................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-36">36</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-5.1.2">5.1.2</a> Request-URI ..............................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-36">36</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-5.2">5.2</a> The Resource Identified by a Request ........................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-38">38</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-5.3">5.3</a> Request Header Fields .......................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-38">38</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-6">6</a> Response ......................................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-39">39</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-6.1">6.1</a> Status-Line .................................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-39">39</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-6.1.1">6.1.1</a> Status Code and Reason Phrase ............................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-39">39</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-6.2">6.2</a> Response Header Fields ......................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-41">41</a>
<span class="grey">Fielding, et al. Standards Track [Page 2]</span></pre>
<hr class="noprint"><!--NewPage--><pre class="newpage"><span id="page-3"></span>
<span class="grey"><a href="https://www.rfc-editor.org/rfc/rfc2616">RFC 2616</a> HTTP/1.1 June 1999</span>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-7">7</a> Entity ........................................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-42">42</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-7.1">7.1</a> Entity Header Fields ........................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-42">42</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-7.2">7.2</a> Entity Body .................................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-43">43</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-7.2.1">7.2.1</a> Type .....................................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-43">43</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-7.2.2">7.2.2</a> Entity Length ............................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-43">43</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-8">8</a> Connections ...................................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-44">44</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-8.1">8.1</a> Persistent Connections ......................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-44">44</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-8.1.1">8.1.1</a> Purpose ..................................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-44">44</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-8.1.2">8.1.2</a> Overall Operation ........................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-45">45</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-8.1.3">8.1.3</a> Proxy Servers ............................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-46">46</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-8.1.4">8.1.4</a> Practical Considerations .................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-46">46</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-8.2">8.2</a> Message Transmission Requirements ...........................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-47">47</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-8.2.1">8.2.1</a> Persistent Connections and Flow Control ..................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-47">47</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-8.2.2">8.2.2</a> Monitoring Connections for Error Status Messages .........<a href="https://www.rfc-editor.org/rfc/rfc2616#page-48">48</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-8.2.3">8.2.3</a> Use of the 100 (Continue) Status .........................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-48">48</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-8.2.4">8.2.4</a> Client Behavior if Server Prematurely Closes Connection ..50
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-9">9</a> Method Definitions ............................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-51">51</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-9.1">9.1</a> Safe and Idempotent Methods .................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-51">51</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-9.1.1">9.1.1</a> Safe Methods .............................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-51">51</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-9.1.2">9.1.2</a> Idempotent Methods .......................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-51">51</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-9.2">9.2</a> OPTIONS .....................................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-52">52</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-9.3">9.3</a> GET .........................................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-53">53</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-9.4">9.4</a> HEAD ........................................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-54">54</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-9.5">9.5</a> POST ........................................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-54">54</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-9.6">9.6</a> PUT .........................................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-55">55</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-9.7">9.7</a> DELETE ......................................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-56">56</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-9.8">9.8</a> TRACE .......................................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-56">56</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-9.9">9.9</a> CONNECT .....................................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-57">57</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-10">10</a> Status Code Definitions ......................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-57">57</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-10.1">10.1</a> Informational 1xx ...........................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-57">57</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-10.1.1">10.1.1</a> 100 Continue .............................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-58">58</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-10.1.2">10.1.2</a> 101 Switching Protocols ..................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-58">58</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-10.2">10.2</a> Successful 2xx ..............................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-58">58</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-10.2.1">10.2.1</a> 200 OK ...................................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-58">58</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-10.2.2">10.2.2</a> 201 Created ..............................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-59">59</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-10.2.3">10.2.3</a> 202 Accepted .............................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-59">59</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-10.2.4">10.2.4</a> 203 Non-Authoritative Information ........................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-59">59</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-10.2.5">10.2.5</a> 204 No Content ...........................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-60">60</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-10.2.6">10.2.6</a> 205 Reset Content ........................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-60">60</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-10.2.7">10.2.7</a> 206 Partial Content ......................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-60">60</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-10.3">10.3</a> Redirection 3xx .............................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-61">61</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-10.3.1">10.3.1</a> 300 Multiple Choices .....................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-61">61</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-10.3.2">10.3.2</a> 301 Moved Permanently ....................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-62">62</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-10.3.3">10.3.3</a> 302 Found ................................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-62">62</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-10.3.4">10.3.4</a> 303 See Other ............................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-63">63</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-10.3.5">10.3.5</a> 304 Not Modified .........................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-63">63</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-10.3.6">10.3.6</a> 305 Use Proxy ............................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-64">64</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-10.3.7">10.3.7</a> 306 (Unused) .............................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-64">64</a>
<span class="grey">Fielding, et al. Standards Track [Page 3]</span></pre>
<hr class="noprint"><!--NewPage--><pre class="newpage"><span id="page-4"></span>
<span class="grey"><a href="https://www.rfc-editor.org/rfc/rfc2616">RFC 2616</a> HTTP/1.1 June 1999</span>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-10.3.8">10.3.8</a> 307 Temporary Redirect ...................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-65">65</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-10.4">10.4</a> Client Error 4xx ............................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-65">65</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-10.4.1">10.4.1</a> 400 Bad Request .........................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-65">65</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-10.4.2">10.4.2</a> 401 Unauthorized ........................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-66">66</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-10.4.3">10.4.3</a> 402 Payment Required ....................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-66">66</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-10.4.4">10.4.4</a> 403 Forbidden ...........................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-66">66</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-10.4.5">10.4.5</a> 404 Not Found ...........................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-66">66</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-10.4.6">10.4.6</a> 405 Method Not Allowed ..................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-66">66</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-10.4.7">10.4.7</a> 406 Not Acceptable ......................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-67">67</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-10.4.8">10.4.8</a> 407 Proxy Authentication Required .......................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-67">67</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-10.4.9">10.4.9</a> 408 Request Timeout .....................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-67">67</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-10.4.10">10.4.10</a> 409 Conflict ............................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-67">67</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-10.4.11">10.4.11</a> 410 Gone ................................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-68">68</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-10.4.12">10.4.12</a> 411 Length Required .....................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-68">68</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-10.4.13">10.4.13</a> 412 Precondition Failed .................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-68">68</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-10.4.14">10.4.14</a> 413 Request Entity Too Large ............................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-69">69</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-10.4.15">10.4.15</a> 414 Request-URI Too Long ................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-69">69</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-10.4.16">10.4.16</a> 415 Unsupported Media Type ..............................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-69">69</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-10.4.17">10.4.17</a> 416 Requested Range Not Satisfiable .....................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-69">69</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-10.4.18">10.4.18</a> 417 Expectation Failed ..................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-70">70</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-10.5">10.5</a> Server Error 5xx ............................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-70">70</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-10.5.1">10.5.1</a> 500 Internal Server Error ................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-70">70</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-10.5.2">10.5.2</a> 501 Not Implemented ......................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-70">70</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-10.5.3">10.5.3</a> 502 Bad Gateway ..........................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-70">70</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-10.5.4">10.5.4</a> 503 Service Unavailable ..................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-70">70</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-10.5.5">10.5.5</a> 504 Gateway Timeout ......................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-71">71</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-10.5.6">10.5.6</a> 505 HTTP Version Not Supported ...........................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-71">71</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-11">11</a> Access Authentication ........................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-71">71</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-12">12</a> Content Negotiation ..........................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-71">71</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-12.1">12.1</a> Server-driven Negotiation ...................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-72">72</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-12.2">12.2</a> Agent-driven Negotiation ....................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-73">73</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-12.3">12.3</a> Transparent Negotiation .....................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-74">74</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-13">13</a> Caching in HTTP ..............................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-74">74</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-13.1.1">13.1.1</a> Cache Correctness ........................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-75">75</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-13.1.2">13.1.2</a> Warnings .................................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-76">76</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-13.1.3">13.1.3</a> Cache-control Mechanisms .................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-77">77</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-13.1.4">13.1.4</a> Explicit User Agent Warnings .............................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-78">78</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-13.1.5">13.1.5</a> Exceptions to the Rules and Warnings .....................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-78">78</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-13.1.6">13.1.6</a> Client-controlled Behavior ...............................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-79">79</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-13.2">13.2</a> Expiration Model ............................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-79">79</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-13.2.1">13.2.1</a> Server-Specified Expiration ..............................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-79">79</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-13.2.2">13.2.2</a> Heuristic Expiration .....................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-80">80</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-13.2.3">13.2.3</a> Age Calculations .........................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-80">80</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-13.2.4">13.2.4</a> Expiration Calculations ..................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-83">83</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-13.2.5">13.2.5</a> Disambiguating Expiration Values .........................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-84">84</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-13.2.6">13.2.6</a> Disambiguating Multiple Responses ........................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-84">84</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-13.3">13.3</a> Validation Model ............................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-85">85</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-13.3.1">13.3.1</a> Last-Modified Dates ......................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-86">86</a>
<span class="grey">Fielding, et al. Standards Track [Page 4]</span></pre>
<hr class="noprint"><!--NewPage--><pre class="newpage"><span id="page-5"></span>
<span class="grey"><a href="https://www.rfc-editor.org/rfc/rfc2616">RFC 2616</a> HTTP/1.1 June 1999</span>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-13.3.2">13.3.2</a> Entity Tag Cache Validators ..............................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-86">86</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-13.3.3">13.3.3</a> Weak and Strong Validators ...............................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-86">86</a>
13.3.4 Rules for When to Use Entity Tags and Last-Modified Dates.89
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-13.3.5">13.3.5</a> Non-validating Conditionals ..............................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-90">90</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-13.4">13.4</a> Response Cacheability .......................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-91">91</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-13.5">13.5</a> Constructing Responses From Caches ..........................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-92">92</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-13.5.1">13.5.1</a> End-to-end and Hop-by-hop Headers ........................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-92">92</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-13.5.2">13.5.2</a> Non-modifiable Headers ...................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-92">92</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-13.5.3">13.5.3</a> Combining Headers ........................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-94">94</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-13.5.4">13.5.4</a> Combining Byte Ranges ....................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-95">95</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-13.6">13.6</a> Caching Negotiated Responses ................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-95">95</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-13.7">13.7</a> Shared and Non-Shared Caches ................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-96">96</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-13.8">13.8</a> Errors or Incomplete Response Cache Behavior ................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-97">97</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-13.9">13.9</a> Side Effects of GET and HEAD ................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-97">97</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-13.10">13.10</a> Invalidation After Updates or Deletions ...................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-97">97</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-13.11">13.11</a> Write-Through Mandatory ...................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-98">98</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-13.12">13.12</a> Cache Replacement .........................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-99">99</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-13.13">13.13</a> History Lists .............................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-99">99</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-14">14</a> Header Field Definitions ....................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-100">100</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-14.1">14.1</a> Accept .....................................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-100">100</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-14.2">14.2</a> Accept-Charset .............................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-102">102</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-14.3">14.3</a> Accept-Encoding ............................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-102">102</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-14.4">14.4</a> Accept-Language ............................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-104">104</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-14.5">14.5</a> Accept-Ranges ..............................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-105">105</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-14.6">14.6</a> Age ........................................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-106">106</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-14.7">14.7</a> Allow ......................................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-106">106</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-14.8">14.8</a> Authorization ..............................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-107">107</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-14.9">14.9</a> Cache-Control ..............................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-108">108</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-14.9.1">14.9.1</a> What is Cacheable .......................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-109">109</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-14.9.2">14.9.2</a> What May be Stored by Caches ............................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-110">110</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-14.9.3">14.9.3</a> Modifications of the Basic Expiration Mechanism .........<a href="https://www.rfc-editor.org/rfc/rfc2616#page-111">111</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-14.9.4">14.9.4</a> Cache Revalidation and Reload Controls ..................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-113">113</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-14.9.5">14.9.5</a> No-Transform Directive ..................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-115">115</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-14.9.6">14.9.6</a> Cache Control Extensions ................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-116">116</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-14.10">14.10</a> Connection ...............................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-117">117</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-14.11">14.11</a> Content-Encoding .........................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-118">118</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-14.12">14.12</a> Content-Language .........................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-118">118</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-14.13">14.13</a> Content-Length ...........................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-119">119</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-14.14">14.14</a> Content-Location .........................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-120">120</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-14.15">14.15</a> Content-MD5 ..............................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-121">121</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-14.16">14.16</a> Content-Range ............................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-122">122</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-14.17">14.17</a> Content-Type .............................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-124">124</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-14.18">14.18</a> Date .....................................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-124">124</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-14.18.1">14.18.1</a> Clockless Origin Server Operation ......................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-125">125</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-14.19">14.19</a> ETag .....................................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-126">126</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-14.20">14.20</a> Expect ...................................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-126">126</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-14.21">14.21</a> Expires ..................................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-127">127</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-14.22">14.22</a> From .....................................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-128">128</a>
<span class="grey">Fielding, et al. Standards Track [Page 5]</span></pre>
<hr class="noprint"><!--NewPage--><pre class="newpage"><span id="page-6"></span>
<span class="grey"><a href="https://www.rfc-editor.org/rfc/rfc2616">RFC 2616</a> HTTP/1.1 June 1999</span>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-14.23">14.23</a> Host .....................................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-128">128</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-14.24">14.24</a> If-Match .................................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-129">129</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-14.25">14.25</a> If-Modified-Since ........................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-130">130</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-14.26">14.26</a> If-None-Match ............................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-132">132</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-14.27">14.27</a> If-Range .................................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-133">133</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-14.28">14.28</a> If-Unmodified-Since ......................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-134">134</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-14.29">14.29</a> Last-Modified ............................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-134">134</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-14.30">14.30</a> Location .................................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-135">135</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-14.31">14.31</a> Max-Forwards .............................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-136">136</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-14.32">14.32</a> Pragma ...................................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-136">136</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-14.33">14.33</a> Proxy-Authenticate .......................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-137">137</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-14.34">14.34</a> Proxy-Authorization ......................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-137">137</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-14.35">14.35</a> Range ....................................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-138">138</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-14.35.1">14.35.1</a> Byte Ranges ...........................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-138">138</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-14.35.2">14.35.2</a> Range Retrieval Requests ..............................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-139">139</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-14.36">14.36</a> Referer ..................................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-140">140</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-14.37">14.37</a> Retry-After ..............................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-141">141</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-14.38">14.38</a> Server ...................................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-141">141</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-14.39">14.39</a> TE .......................................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-142">142</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-14.40">14.40</a> Trailer ..................................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-143">143</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-14.41">14.41</a> Transfer-Encoding..........................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-143">143</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-14.42">14.42</a> Upgrade ..................................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-144">144</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-14.43">14.43</a> User-Agent ...............................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-145">145</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-14.44">14.44</a> Vary .....................................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-145">145</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-14.45">14.45</a> Via ......................................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-146">146</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-14.46">14.46</a> Warning ..................................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-148">148</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-14.47">14.47</a> WWW-Authenticate .........................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-150">150</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-15">15</a> Security Considerations .......................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-150">150</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-15.1">15.1</a> Personal Information....................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-151">151</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-15.1.1">15.1.1</a> Abuse of Server Log Information .........................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-151">151</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-15.1.2">15.1.2</a> Transfer of Sensitive Information .......................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-151">151</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-15.1.3">15.1.3</a> Encoding Sensitive Information in URI's .................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-152">152</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-15.1.4">15.1.4</a> Privacy Issues Connected to Accept Headers ..............<a href="https://www.rfc-editor.org/rfc/rfc2616#page-152">152</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-15.2">15.2</a> Attacks Based On File and Path Names .......................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-153">153</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-15.3">15.3</a> DNS Spoofing ...............................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-154">154</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-15.4">15.4</a> Location Headers and Spoofing ..............................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-154">154</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-15.5">15.5</a> Content-Disposition Issues .................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-154">154</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-15.6">15.6</a> Authentication Credentials and Idle Clients ................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-155">155</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-15.7">15.7</a> Proxies and Caching ........................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-155">155</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-15.7.1">15.7.1</a> Denial of Service Attacks on Proxies....................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-156">156</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-16">16</a> Acknowledgments .............................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-156">156</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-17">17</a> References ..................................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-158">158</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-18">18</a> Authors' Addresses ..........................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-162">162</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-19">19</a> Appendices ..................................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-164">164</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-19.1">19.1</a> Internet Media Type message/http and application/http ......<a href="https://www.rfc-editor.org/rfc/rfc2616#page-164">164</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-19.2">19.2</a> Internet Media Type multipart/byteranges ...................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-165">165</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-19.3">19.3</a> Tolerant Applications ......................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-166">166</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-19.4">19.4</a> Differences Between HTTP Entities and <a href="https://www.rfc-editor.org/rfc/rfc2045">RFC 2045</a> Entities ....<a href="https://www.rfc-editor.org/rfc/rfc2616#page-167">167</a>
<span class="grey">Fielding, et al. Standards Track [Page 6]</span></pre>
<hr class="noprint"><!--NewPage--><pre class="newpage"><span id="page-7"></span>
<span class="grey"><a href="https://www.rfc-editor.org/rfc/rfc2616">RFC 2616</a> HTTP/1.1 June 1999</span>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-19.4.1">19.4.1</a> MIME-Version ............................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-167">167</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-19.4.2">19.4.2</a> Conversion to Canonical Form ............................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-167">167</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-19.4.3">19.4.3</a> Conversion of Date Formats ..............................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-168">168</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-19.4.4">19.4.4</a> Introduction of Content-Encoding ........................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-168">168</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-19.4.5">19.4.5</a> No Content-Transfer-Encoding ............................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-168">168</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-19.4.6">19.4.6</a> Introduction of Transfer-Encoding .......................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-169">169</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-19.4.7">19.4.7</a> MHTML and Line Length Limitations .......................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-169">169</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-19.5">19.5</a> Additional Features ........................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-169">169</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-19.5.1">19.5.1</a> Content-Disposition .....................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-170">170</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-19.6">19.6</a> Compatibility with Previous Versions .......................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-170">170</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-19.6.1">19.6.1</a> Changes from HTTP/1.0 ...................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-171">171</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-19.6.2">19.6.2</a> Compatibility with HTTP/1.0 Persistent Connections ......<a href="https://www.rfc-editor.org/rfc/rfc2616#page-172">172</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-19.6.3">19.6.3</a> Changes from <a href="https://www.rfc-editor.org/rfc/rfc2068">RFC 2068</a> ...................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-172">172</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-20">20</a> Index .......................................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-175">175</a>
<a href="https://www.rfc-editor.org/rfc/rfc2616#section-21">21</a> Full Copyright Statement ....................................<a href="https://www.rfc-editor.org/rfc/rfc2616#page-176">176</a>
<span class="h2"><a class="selflink" id="section-1" href="https://www.rfc-editor.org/rfc/rfc2616#section-1">1</a> Introduction</span>
<span class="h3"><a class="selflink" id="section-1.1" href="https://www.rfc-editor.org/rfc/rfc2616#section-1.1">1.1</a> Purpose</span>
The Hypertext Transfer Protocol (HTTP) is an application-level
protocol for distributed, collaborative, hypermedia information
systems. HTTP has been in use by the World-Wide Web global
information initiative since 1990. The first version of HTTP,
referred to as HTTP/0.9, was a simple protocol for raw data transfer
across the Internet. HTTP/1.0, as defined by <a href="https://www.rfc-editor.org/rfc/rfc1945">RFC 1945</a> [<a href="https://www.rfc-editor.org/rfc/rfc2616#ref-6" title=""Hypertext Transfer Protocol -- HTTP/1.0"">6</a>], improved
the protocol by allowing messages to be in the format of MIME-like
messages, containing metainformation about the data transferred and
modifiers on the request/response semantics. However, HTTP/1.0 does
not sufficiently take into consideration the effects of hierarchical
proxies, caching, the need for persistent connections, or virtual
hosts. In addition, the proliferation of incompletely-implemented
applications calling themselves "HTTP/1.0" has necessitated a
protocol version change in order for two communicating applications
to determine each other's true capabilities.
This specification defines the protocol referred to as "HTTP/1.1".
This protocol includes more stringent requirements than HTTP/1.0 in
order to ensure reliable implementation of its features.
Practical information systems require more functionality than simple
retrieval, including search, front-end update, and annotation. HTTP
allows an open-ended set of methods and headers that indicate the
purpose of a request [<a href="https://www.rfc-editor.org/rfc/rfc2616#ref-47" title=""Hyper Text Coffee Pot Control Protocol (HTCPCP/1.0)"">47</a>]. It builds on the discipline of reference
provided by the Uniform Resource Identifier (URI) [<a href="https://www.rfc-editor.org/rfc/rfc2616#ref-3" title=""Universal Resource Identifiers in WWW"">3</a>], as a location
(URL) [<a href="https://www.rfc-editor.org/rfc/rfc2616#ref-4" title=""Uniform Resource Locators (URL)"">4</a>] or name (URN) [<a href="https://www.rfc-editor.org/rfc/rfc2616#ref-20" title=""Functional Requirements for Uniform Resource Names"">20</a>], for indicating the resource to which a
<span class="grey">Fielding, et al. Standards Track [Page 7]</span></pre>
<hr class="noprint"><!--NewPage--><pre class="newpage"><span id="page-8"></span>
<span class="grey"><a href="https://www.rfc-editor.org/rfc/rfc2616">RFC 2616</a> HTTP/1.1 June 1999</span>
method is to be applied. Messages are passed in a format similar to
that used by Internet mail [<a href="https://www.rfc-editor.org/rfc/rfc2616#ref-9" title=""Standard for The Format of ARPA Internet Text Messages"">9</a>] as defined by the Multipurpose
Internet Mail Extensions (MIME) [<a href="https://www.rfc-editor.org/rfc/rfc2616#ref-7" title=""Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies"">7</a>].
HTTP is also used as a generic protocol for communication between
user agents and proxies/gateways to other Internet systems, including
those supported by the SMTP [<a href="https://www.rfc-editor.org/rfc/rfc2616#ref-16" title=""Simple Mail Transfer Protocol"">16</a>], NNTP [<a href="https://www.rfc-editor.org/rfc/rfc2616#ref-13" title=""Network News Transfer Protocol"">13</a>], FTP [<a href="https://www.rfc-editor.org/rfc/rfc2616#ref-18" title=""File Transfer Protocol"">18</a>], Gopher [<a href="https://www.rfc-editor.org/rfc/rfc2616#ref-2" title=""The Internet Gopher Protocol (a distributed document search and retrieval protocol)"">2</a>],
and WAIS [<a href="https://www.rfc-editor.org/rfc/rfc2616#ref-10" title=""WAIS Interface Protocol Prototype Functional Specification,"">10</a>] protocols. In this way, HTTP allows basic hypermedia
access to resources available from diverse applications.
<span class="h3"><a class="selflink" id="section-1.2" href="https://www.rfc-editor.org/rfc/rfc2616#section-1.2">1.2</a> Requirements</span>
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in <a href="https://www.rfc-editor.org/rfc/rfc2119">RFC 2119</a> [<a href="https://www.rfc-editor.org/rfc/rfc2616#ref-34" title=""Key words for use in RFCs to Indicate Requirement Levels"">34</a>].
An implementation is not compliant if it fails to satisfy one or more
of the MUST or REQUIRED level requirements for the protocols it
implements. An implementation that satisfies all the MUST or REQUIRED
level and all the SHOULD level requirements for its protocols is said
to be "unconditionally compliant"; one that satisfies all the MUST
level requirements but not all the SHOULD level requirements for its
protocols is said to be "conditionally compliant."
<span class="h3"><a class="selflink" id="section-1.3" href="https://www.rfc-editor.org/rfc/rfc2616#section-1.3">1.3</a> Terminology</span>
This specification uses a number of terms to refer to the roles
played by participants in, and objects of, the HTTP communication.
connection
A transport layer virtual circuit established between two programs
for the purpose of communication.
message
The basic unit of HTTP communication, consisting of a structured
sequence of octets matching the syntax defined in <a href="https://www.rfc-editor.org/rfc/rfc2616#section-4">section 4</a> and
transmitted via the connection.
request
An HTTP request message, as defined in <a href="https://www.rfc-editor.org/rfc/rfc2616#section-5">section 5</a>.
response
An HTTP response message, as defined in <a href="https://www.rfc-editor.org/rfc/rfc2616#section-6">section 6</a>.
<span class="grey">Fielding, et al. Standards Track [Page 8]</span></pre>
<hr class="noprint"><!--NewPage--><pre class="newpage"><span id="page-9"></span>
<span class="grey"><a href="https://www.rfc-editor.org/rfc/rfc2616">RFC 2616</a> HTTP/1.1 June 1999</span>
resource
A network data object or service that can be identified by a URI,
as defined in <a href="https://www.rfc-editor.org/rfc/rfc2616#section-3.2">section 3.2</a>. Resources may be available in multiple
representations (e.g. multiple languages, data formats, size, and
resolutions) or vary in other ways.
entity
The information transferred as the payload of a request or
response. An entity consists of metainformation in the form of
entity-header fields and content in the form of an entity-body, as
described in <a href="https://www.rfc-editor.org/rfc/rfc2616#section-7">section 7</a>.
representation
An entity included with a response that is subject to content
negotiation, as described in <a href="https://www.rfc-editor.org/rfc/rfc2616#section-12">section 12</a>. There may exist multiple
representations associated with a particular response status.
content negotiation
The mechanism for selecting the appropriate representation when
servicing a request, as described in <a href="https://www.rfc-editor.org/rfc/rfc2616#section-12">section 12</a>. The
representation of entities in any response can be negotiated
(including error responses).
variant
A resource may have one, or more than one, representation(s)
associated with it at any given instant. Each of these
representations is termed a `varriant'. Use of the term `variant'
does not necessarily imply that the resource is subject to content
negotiation.
client
A program that establishes connections for the purpose of sending
requests.
user agent
The client which initiates a request. These are often browsers,
editors, spiders (web-traversing robots), or other end user tools.
server
An application program that accepts connections in order to
service requests by sending back responses. Any given program may
be capable of being both a client and a server; our use of these
terms refers only to the role being performed by the program for a
particular connection, rather than to the program's capabilities
in general. Likewise, any server may act as an origin server,
proxy, gateway, or tunnel, switching behavior based on the nature
of each request.
<span class="grey">Fielding, et al. Standards Track [Page 9]</span></pre>
<hr class="noprint"><!--NewPage--><pre class="newpage"><span id="page-10"></span>
<span class="grey"><a href="https://www.rfc-editor.org/rfc/rfc2616">RFC 2616</a> HTTP/1.1 June 1999</span>
origin server
The server on which a given resource resides or is to be created.
proxy
An intermediary program which acts as both a server and a client
for the purpose of making requests on behalf of other clients.
Requests are serviced internally or by passing them on, with
possible translation, to other servers. A proxy MUST implement
both the client and server requirements of this specification. A
"transparent proxy" is a proxy that does not modify the request or
response beyond what is required for proxy authentication and
identification. A "non-transparent proxy" is a proxy that modifies
the request or response in order to provide some added service to
the user agent, such as group annotation services, media type
transformation, protocol reduction, or anonymity filtering. Except
where either transparent or non-transparent behavior is explicitly
stated, the HTTP proxy requirements apply to both types of
proxies.
gateway
A server which acts as an intermediary for some other server.
Unlike a proxy, a gateway receives requests as if it were the
origin server for the requested resource; the requesting client
may not be aware that it is communicating with a gateway.
tunnel
An intermediary program which is acting as a blind relay between
two connections. Once active, a tunnel is not considered a party
to the HTTP communication, though the tunnel may have been
initiated by an HTTP request. The tunnel ceases to exist when both
ends of the relayed connections are closed.
cache
A program's local store of response messages and the subsystem
that controls its message storage, retrieval, and deletion. A
cache stores cacheable responses in order to reduce the response
time and network bandwidth consumption on future, equivalent
requests. Any client or server may include a cache, though a cache
cannot be used by a server that is acting as a tunnel.
cacheable
A response is cacheable if a cache is allowed to store a copy of
the response message for use in answering subsequent requests. The
rules for determining the cacheability of HTTP responses are
defined in <a href="https://www.rfc-editor.org/rfc/rfc2616#section-13">section 13</a>. Even if a resource is cacheable, there may
be additional constraints on whether a cache can use the cached
copy for a particular request.
<span class="grey">Fielding, et al. Standards Track [Page 10]</span></pre>
<hr class="noprint"><!--NewPage--><pre class="newpage"><span id="page-11"></span>
<span class="grey"><a href="https://www.rfc-editor.org/rfc/rfc2616">RFC 2616</a> HTTP/1.1 June 1999</span>
first-hand
A response is first-hand if it comes directly and without
unnecessary delay from the origin server, perhaps via one or more
proxies. A response is also first-hand if its validity has just
been checked directly with the origin server.
explicit expiration time
The time at which the origin server intends that an entity should
no longer be returned by a cache without further validation.
heuristic expiration time
An expiration time assigned by a cache when no explicit expiration
time is available.
age
The age of a response is the time since it was sent by, or
successfully validated with, the origin server.
freshness lifetime
The length of time between the generation of a response and its
expiration time.
fresh
A response is fresh if its age has not yet exceeded its freshness
lifetime.
stale
A response is stale if its age has passed its freshness lifetime.
semantically transparent
A cache behaves in a "semantically transparent" manner, with
respect to a particular response, when its use affects neither the
requesting client nor the origin server, except to improve
performance. When a cache is semantically transparent, the client
receives exactly the same response (except for hop-by-hop headers)
that it would have received had its request been handled directly
by the origin server.
validator
A protocol element (e.g., an entity tag or a Last-Modified time)
that is used to find out whether a cache entry is an equivalent
copy of an entity.
upstream/downstream
Upstream and downstream describe the flow of a message: all
messages flow from upstream to downstream.
<span class="grey">Fielding, et al. Standards Track [Page 11]</span></pre>
<hr class="noprint"><!--NewPage--><pre class="newpage"><span id="page-12"></span>
<span class="grey"><a href="https://www.rfc-editor.org/rfc/rfc2616">RFC 2616</a> HTTP/1.1 June 1999</span>
inbound/outbound
Inbound and outbound refer to the request and response paths for
messages: "inbound" means "traveling toward the origin server",
and "outbound" means "traveling toward the user agent"
<span class="h3"><a class="selflink" id="section-1.4" href="https://www.rfc-editor.org/rfc/rfc2616#section-1.4">1.4</a> Overall Operation</span>
The HTTP protocol is a request/response protocol. A client sends a
request to the server in the form of a request method, URI, and
protocol version, followed by a MIME-like message containing request
modifiers, client information, and possible body content over a
connection with a server. The server responds with a status line,
including the message's protocol version and a success or error code,
followed by a MIME-like message containing server information, entity
metainformation, and possible entity-body content. The relationship
between HTTP and MIME is described in appendix 19.4.
Most HTTP communication is initiated by a user agent and consists of
a request to be applied to a resource on some origin server. In the
simplest case, this may be accomplished via a single connection (v)
between the user agent (UA) and the origin server (O).
request chain ------------------------>
UA -------------------v------------------- O
<----------------------- response chain
A more complicated situation occurs when one or more intermediaries
are present in the request/response chain. There are three common
forms of intermediary: proxy, gateway, and tunnel. A proxy is a
forwarding agent, receiving requests for a URI in its absolute form,
rewriting all or part of the message, and forwarding the reformatted
request toward the server identified by the URI. A gateway is a
receiving agent, acting as a layer above some other server(s) and, if
necessary, translating the requests to the underlying server's
protocol. A tunnel acts as a relay point between two connections
without changing the messages; tunnels are used when the
communication needs to pass through an intermediary (such as a
firewall) even when the intermediary cannot understand the contents
of the messages.
request chain -------------------------------------->
UA -----v----- A -----v----- B -----v----- C -----v----- O
<------------------------------------- response chain
The figure above shows three intermediaries (A, B, and C) between the
user agent and origin server. A request or response message that
travels the whole chain will pass through four separate connections.
This distinction is important because some HTTP communication options
<span class="grey">Fielding, et al. Standards Track [Page 12]</span></pre>
<hr class="noprint"><!--NewPage--><pre class="newpage"><span id="page-13"></span>
<span class="grey"><a href="https://www.rfc-editor.org/rfc/rfc2616">RFC 2616</a> HTTP/1.1 June 1999</span>
may apply only to the connection with the nearest, non-tunnel
neighbor, only to the end-points of the chain, or to all connections
along the chain. Although the diagram is linear, each participant may
be engaged in multiple, simultaneous communications. For example, B
may be receiving requests from many clients other than A, and/or
forwarding requests to servers other than C, at the same time that it
is handling A's request.
Any party to the communication which is not acting as a tunnel may
employ an internal cache for handling requests. The effect of a cache
is that the request/response chain is shortened if one of the
participants along the chain has a cached response applicable to that
request. The following illustrates the resulting chain if B has a
cached copy of an earlier response from O (via C) for a request which
has not been cached by UA or A.
request chain ---------->
UA -----v----- A -----v----- B - - - - - - C - - - - - - O
<--------- response chain
Not all responses are usefully cacheable, and some requests may
contain modifiers which place special requirements on cache behavior.
HTTP requirements for cache behavior and cacheable responses are
defined in <a href="https://www.rfc-editor.org/rfc/rfc2616#section-13">section 13</a>.
In fact, there are a wide variety of architectures and configurations
of caches and proxies currently being experimented with or deployed
across the World Wide Web. These systems include national hierarchies
of proxy caches to save transoceanic bandwidth, systems that
broadcast or multicast cache entries, organizations that distribute
subsets of cached data via CD-ROM, and so on. HTTP systems are used
in corporate intranets over high-bandwidth links, and for access via
PDAs with low-power radio links and intermittent connectivity. The
goal of HTTP/1.1 is to support the wide diversity of configurations
already deployed while introducing protocol constructs that meet the
needs of those who build web applications that require high
reliability and, failing that, at least reliable indications of
failure.
HTTP communication usually takes place over TCP/IP connections. The
default port is TCP 80 [<a href="https://www.rfc-editor.org/rfc/rfc2616#ref-19" title=""Assigned Numbers"">19</a>], but other ports can be used. This does
not preclude HTTP from being implemented on top of any other protocol
on the Internet, or on other networks. HTTP only presumes a reliable
transport; any protocol that provides such guarantees can be used;
the mapping of the HTTP/1.1 request and response structures onto the
transport data units of the protocol in question is outside the scope
of this specification.
<span class="grey">Fielding, et al. Standards Track [Page 13]</span></pre>
<hr class="noprint"><!--NewPage--><pre class="newpage"><span id="page-14"></span>
<span class="grey"><a href="https://www.rfc-editor.org/rfc/rfc2616">RFC 2616</a> HTTP/1.1 June 1999</span>
In HTTP/1.0, most implementations used a new connection for each
request/response exchange. In HTTP/1.1, a connection may be used for
one or more request/response exchanges, although connections may be
closed for a variety of reasons (see <a href="https://www.rfc-editor.org/rfc/rfc2616#section-8.1">section 8.1</a>).
<span class="h2"><a class="selflink" id="section-2" href="https://www.rfc-editor.org/rfc/rfc2616#section-2">2</a> Notational Conventions and Generic Grammar</span>
<span class="h3"><a class="selflink" id="section-2.1" href="https://www.rfc-editor.org/rfc/rfc2616#section-2.1">2.1</a> Augmented BNF</span>
All of the mechanisms specified in this document are described in
both prose and an augmented Backus-Naur Form (BNF) similar to that
used by <a href="https://www.rfc-editor.org/rfc/rfc822">RFC 822</a> [<a href="https://www.rfc-editor.org/rfc/rfc2616#ref-9" title=""Standard for The Format of ARPA Internet Text Messages"">9</a>]. Implementors will need to be familiar with the
notation in order to understand this specification. The augmented BNF
includes the following constructs:
name = definition
The name of a rule is simply the name itself (without any
enclosing "<" and ">") and is separated from its definition by the
equal "=" character. White space is only significant in that
indentation of continuation lines is used to indicate a rule
definition that spans more than one line. Certain basic rules are
in uppercase, such as SP, LWS, HT, CRLF, DIGIT, ALPHA, etc. Angle
brackets are used within definitions whenever their presence will
facilitate discerning the use of rule names.
"literal"
Quotation marks surround literal text. Unless stated otherwise,
the text is case-insensitive.
rule1 | rule2
Elements separated by a bar ("|") are alternatives, e.g., "yes |
no" will accept yes or no.
(rule1 rule2)
Elements enclosed in parentheses are treated as a single element.
Thus, "(elem (foo | bar) elem)" allows the token sequences "elem
foo elem" and "elem bar elem".
*rule
The character "*" preceding an element indicates repetition. The
full form is "<n>*<m>element" indicating at least <n> and at most
<m> occurrences of element. Default values are 0 and infinity so
that "*(element)" allows any number, including zero; "1*element"
requires at least one; and "1*2element" allows one or two.
[<a id="ref-rule">rule</a>]
Square brackets enclose optional elements; "[foo bar]" is
equivalent to "*1(foo bar)".
<span class="grey">Fielding, et al. Standards Track [Page 14]</span></pre>
<hr class="noprint"><!--NewPage--><pre class="newpage"><span id="page-15"></span>
<span class="grey"><a href="https://www.rfc-editor.org/rfc/rfc2616">RFC 2616</a> HTTP/1.1 June 1999</span>
N rule
Specific repetition: "<n>(element)" is equivalent to
"<n>*<n>(element)"; that is, exactly <n> occurrences of (element).
Thus 2DIGIT is a 2-digit number, and 3ALPHA is a string of three
alphabetic characters.
#rule
A construct "#" is defined, similar to "*", for defining lists of
elements. The full form is "<n>#<m>element" indicating at least
<n> and at most <m> elements, each separated by one or more commas
(",") and OPTIONAL linear white space (LWS). This makes the usual
form of lists very easy; a rule such as
( *LWS element *( *LWS "," *LWS element ))
can be shown as
1#element
Wherever this construct is used, null elements are allowed, but do
not contribute to the count of elements present. That is,
"(element), , (element) " is permitted, but counts as only two
elements. Therefore, where at least one element is required, at
least one non-null element MUST be present. Default values are 0
and infinity so that "#element" allows any number, including zero;
"1#element" requires at least one; and "1#2element" allows one or
two.
; comment
A semi-colon, set off some distance to the right of rule text,
starts a comment that continues to the end of line. This is a
simple way of including useful notes in parallel with the
specifications.
implied *LWS
The grammar described by this specification is word-based. Except
where noted otherwise, linear white space (LWS) can be included
between any two adjacent words (token or quoted-string), and
between adjacent words and separators, without changing the
interpretation of a field. At least one delimiter (LWS and/or
separators) MUST exist between any two tokens (for the definition
of "token" below), since they would otherwise be interpreted as a
single token.
<span class="h3"><a class="selflink" id="section-2.2" href="https://www.rfc-editor.org/rfc/rfc2616#section-2.2">2.2</a> Basic Rules</span>
The following rules are used throughout this specification to
describe basic parsing constructs. The US-ASCII coded character set
is defined by ANSI X3.4-1986 [<a href="https://www.rfc-editor.org/rfc/rfc2616#ref-21" title="ANSI">21</a>].