Changeset 1923
- Timestamp:
- 01/10/12 07:39:45 (10 years ago)
- Location:
- draft-ietf-httpbis/latest
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
draft-ietf-httpbis/latest/p2-semantics.html
r1922 r1923 449 449 } 450 450 @bottom-center { 451 content: "Expires April 3,2013";451 content: "Expires March 2013"; 452 452 } 453 453 @bottom-right { … … 474 474 <link rel="Chapter" title="2 Resource" href="#rfc.section.2"> 475 475 <link rel="Chapter" title="3 Representation" href="#rfc.section.3"> 476 <link rel="Chapter" title="4 Request Methods" href="#rfc.section.4">477 <link rel="Chapter" title="5 Request Header Fields" href="#rfc.section.5">478 <link rel="Chapter" title="6 Re sponse Status Codes" href="#rfc.section.6">479 <link rel="Chapter" title="7 Response Header Fields" href="#rfc.section.7">480 <link rel="Chapter" title="8 Protocol Parameters" href="#rfc.section.8">476 <link rel="Chapter" title="4 Product Tokens" href="#rfc.section.4"> 477 <link rel="Chapter" title="5 Request Methods" href="#rfc.section.5"> 478 <link rel="Chapter" title="6 Request Header Fields" href="#rfc.section.6"> 479 <link rel="Chapter" title="7 Response Status Codes" href="#rfc.section.7"> 480 <link rel="Chapter" title="8 Response Header Fields" href="#rfc.section.8"> 481 481 <link rel="Chapter" title="9 IANA Considerations" href="#rfc.section.9"> 482 482 <link rel="Chapter" title="10 Security Considerations" href="#rfc.section.10"> … … 496 496 <meta name="dct.creator" content="Reschke, J. F."> 497 497 <meta name="dct.identifier" content="urn:ietf:id:draft-ietf-httpbis-p2-semantics-latest"> 498 <meta name="dct.issued" scheme="ISO8601" content="2012-09 -30">498 <meta name="dct.issued" scheme="ISO8601" content="2012-09"> 499 499 <meta name="dct.replaces" content="urn:ietf:rfc:2616"> 500 500 <meta name="dct.abstract" content="The Hypertext Transfer Protocol (HTTP) is an application-level protocol for distributed, collaborative, hypertext information systems. This document defines the semantics of HTTP/1.1 messages, as expressed by request methods, request header fields, response status codes, and response header fields, along with the payload of messages (metadata and body content) and mechanisms for content negotiation."> … … 524 524 <tr> 525 525 <td class="left">Intended status: Standards Track</td> 526 <td class="right">September 30,2012</td>526 <td class="right">September 2012</td> 527 527 </tr> 528 528 <tr> 529 <td class="left">Expires: April 3,2013</td>529 <td class="left">Expires: March 2013</td> 530 530 <td class="right"></td> 531 531 </tr> … … 555 555 in progress”. 556 556 </p> 557 <p>This Internet-Draft will expire on April 3,2013.</p>557 <p>This Internet-Draft will expire in March 2013.</p> 558 558 <h1><a id="rfc.copyrightnotice" href="#rfc.copyrightnotice">Copyright Notice</a></h1> 559 559 <p>Copyright © 2012 IETF Trust and the persons identified as the document authors. All rights reserved.</p> … … 580 580 <li><a href="#rfc.section.2">2.</a> <a href="#resource">Resource</a></li> 581 581 <li><a href="#rfc.section.3">3.</a> <a href="#representation">Representation</a><ul> 582 <li><a href="#rfc.section.3.1">3.1</a> <a href="#representation.header.fields">Representation Header Fields</a><ul> 583 <li><a href="#rfc.section.3.1.1">3.1.1</a> <a href="#header.content-type">Content-Type</a></li> 584 <li><a href="#rfc.section.3.1.2">3.1.2</a> <a href="#header.content-encoding">Content-Encoding</a></li> 585 <li><a href="#rfc.section.3.1.3">3.1.3</a> <a href="#header.content-language">Content-Language</a></li> 586 <li><a href="#rfc.section.3.1.4">3.1.4</a> <a href="#header.content-location">Content-Location</a></li> 582 <li><a href="#rfc.section.3.1">3.1</a> <a href="#representation.metadata">Representation Metadata</a><ul> 583 <li><a href="#rfc.section.3.1.1">3.1.1</a> <a href="#data.type">Data Type</a><ul> 584 <li><a href="#rfc.section.3.1.1.1">3.1.1.1</a> <a href="#media.types">Media Types</a></li> 585 <li><a href="#rfc.section.3.1.1.2">3.1.1.2</a> <a href="#character.sets">Character Encodings (charset)</a></li> 586 <li><a href="#rfc.section.3.1.1.3">3.1.1.3</a> <a href="#canonicalization.and.text.defaults">Canonicalization and Text Defaults</a></li> 587 <li><a href="#rfc.section.3.1.1.4">3.1.1.4</a> <a href="#multipart.types">Multipart Types</a></li> 588 <li><a href="#rfc.section.3.1.1.5">3.1.1.5</a> <a href="#header.content-type">Content-Type</a></li> 589 </ul> 590 </li> 591 <li><a href="#rfc.section.3.1.2">3.1.2</a> <a href="#data.encoding">Data Encoding</a><ul> 592 <li><a href="#rfc.section.3.1.2.1">3.1.2.1</a> <a href="#content.codings">Content Codings</a></li> 593 <li><a href="#rfc.section.3.1.2.2">3.1.2.2</a> <a href="#header.content-encoding">Content-Encoding</a></li> 594 </ul> 595 </li> 596 <li><a href="#rfc.section.3.1.3">3.1.3</a> <a href="#audience.language">Audience Language</a><ul> 597 <li><a href="#rfc.section.3.1.3.1">3.1.3.1</a> <a href="#language.tags">Language Tags</a></li> 598 <li><a href="#rfc.section.3.1.3.2">3.1.3.2</a> <a href="#header.content-language">Content-Language</a></li> 599 </ul> 600 </li> 601 <li><a href="#rfc.section.3.1.4">3.1.4</a> <a href="#identification">Identification</a><ul> 602 <li><a href="#rfc.section.3.1.4.1">3.1.4.1</a> <a href="#identifying.payload">Identifying the Payload</a></li> 603 <li><a href="#rfc.section.3.1.4.2">3.1.4.2</a> <a href="#header.content-location">Content-Location</a></li> 604 </ul> 605 </li> 587 606 </ul> 588 607 </li> 589 608 <li><a href="#rfc.section.3.2">3.2</a> <a href="#representation.data">Representation Data</a></li> 590 <li><a href="#rfc.section.3.3">3.3</a> <a href="#payload">Message Payload</a><ul> 591 <li><a href="#rfc.section.3.3.1">3.3.1</a> <a href="#payload.header.fields">Payload Header Fields</a></li> 592 <li><a href="#rfc.section.3.3.2">3.3.2</a> <a href="#identifying.payload">Identifying the Payload</a></li> 593 </ul> 594 </li> 609 <li><a href="#rfc.section.3.3">3.3</a> <a href="#payload">Payload Semantics</a></li> 595 610 <li><a href="#rfc.section.3.4">3.4</a> <a href="#content.negotiation">Content Negotiation</a><ul> 596 611 <li><a href="#rfc.section.3.4.1">3.4.1</a> <a href="#proactive.negotiation">Proactive Negotiation</a></li> … … 600 615 </ul> 601 616 </li> 602 <li><a href="#rfc.section.4">4.</a> <a href="#methods">Request Methods</a><ul> 603 <li><a href="#rfc.section.4.1">4.1</a> <a href="#method.overview">Overview</a></li> 604 <li><a href="#rfc.section.4.2">4.2</a> <a href="#method.properties">Common Method Properties</a><ul> 605 <li><a href="#rfc.section.4.2.1">4.2.1</a> <a href="#safe.methods">Safe Methods</a></li> 606 <li><a href="#rfc.section.4.2.2">4.2.2</a> <a href="#idempotent.methods">Idempotent Methods</a></li> 607 <li><a href="#rfc.section.4.2.3">4.2.3</a> <a href="#cacheable.methods">Cacheable Methods</a></li> 617 <li><a href="#rfc.section.4">4.</a> <a href="#product.tokens">Product Tokens</a></li> 618 <li><a href="#rfc.section.5">5.</a> <a href="#methods">Request Methods</a><ul> 619 <li><a href="#rfc.section.5.1">5.1</a> <a href="#method.overview">Overview</a></li> 620 <li><a href="#rfc.section.5.2">5.2</a> <a href="#method.properties">Common Method Properties</a><ul> 621 <li><a href="#rfc.section.5.2.1">5.2.1</a> <a href="#safe.methods">Safe Methods</a></li> 622 <li><a href="#rfc.section.5.2.2">5.2.2</a> <a href="#idempotent.methods">Idempotent Methods</a></li> 623 <li><a href="#rfc.section.5.2.3">5.2.3</a> <a href="#cacheable.methods">Cacheable Methods</a></li> 608 624 </ul> 609 625 </li> 610 <li><a href="#rfc.section. 4.3">4.3</a> <a href="#method.definitions">Method Definitions</a><ul>611 <li><a href="#rfc.section. 4.3.1">4.3.1</a> <a href="#GET">GET</a></li>612 <li><a href="#rfc.section. 4.3.2">4.3.2</a> <a href="#HEAD">HEAD</a></li>613 <li><a href="#rfc.section. 4.3.3">4.3.3</a> <a href="#POST">POST</a></li>614 <li><a href="#rfc.section. 4.3.4">4.3.4</a> <a href="#PUT">PUT</a></li>615 <li><a href="#rfc.section. 4.3.5">4.3.5</a> <a href="#DELETE">DELETE</a></li>616 <li><a href="#rfc.section. 4.3.6">4.3.6</a> <a href="#CONNECT">CONNECT</a></li>617 <li><a href="#rfc.section. 4.3.7">4.3.7</a> <a href="#OPTIONS">OPTIONS</a></li>618 <li><a href="#rfc.section. 4.3.8">4.3.8</a> <a href="#TRACE">TRACE</a></li>626 <li><a href="#rfc.section.5.3">5.3</a> <a href="#method.definitions">Method Definitions</a><ul> 627 <li><a href="#rfc.section.5.3.1">5.3.1</a> <a href="#GET">GET</a></li> 628 <li><a href="#rfc.section.5.3.2">5.3.2</a> <a href="#HEAD">HEAD</a></li> 629 <li><a href="#rfc.section.5.3.3">5.3.3</a> <a href="#POST">POST</a></li> 630 <li><a href="#rfc.section.5.3.4">5.3.4</a> <a href="#PUT">PUT</a></li> 631 <li><a href="#rfc.section.5.3.5">5.3.5</a> <a href="#DELETE">DELETE</a></li> 632 <li><a href="#rfc.section.5.3.6">5.3.6</a> <a href="#CONNECT">CONNECT</a></li> 633 <li><a href="#rfc.section.5.3.7">5.3.7</a> <a href="#OPTIONS">OPTIONS</a></li> 634 <li><a href="#rfc.section.5.3.8">5.3.8</a> <a href="#TRACE">TRACE</a></li> 619 635 </ul> 620 636 </li> 621 637 </ul> 622 638 </li> 623 <li><a href="#rfc.section. 5">5.</a> <a href="#request.header.fields">Request Header Fields</a><ul>624 <li><a href="#rfc.section. 5.1">5.1</a> <a href="#request.controls">Controls</a><ul>625 <li><a href="#rfc.section. 5.1.1">5.1.1</a> <a href="#header.max-forwards">Max-Forwards</a></li>626 <li><a href="#rfc.section. 5.1.2">5.1.2</a> <a href="#header.expect">Expect</a><ul>627 <li><a href="#rfc.section. 5.1.2.1">5.1.2.1</a> <a href="#use.of.the.100.status">Use of the 100 (Continue) Status</a></li>639 <li><a href="#rfc.section.6">6.</a> <a href="#request.header.fields">Request Header Fields</a><ul> 640 <li><a href="#rfc.section.6.1">6.1</a> <a href="#request.controls">Controls</a><ul> 641 <li><a href="#rfc.section.6.1.1">6.1.1</a> <a href="#header.max-forwards">Max-Forwards</a></li> 642 <li><a href="#rfc.section.6.1.2">6.1.2</a> <a href="#header.expect">Expect</a><ul> 643 <li><a href="#rfc.section.6.1.2.1">6.1.2.1</a> <a href="#use.of.the.100.status">Use of the 100 (Continue) Status</a></li> 628 644 </ul> 629 645 </li> 630 646 </ul> 631 647 </li> 632 <li><a href="#rfc.section. 5.2">5.2</a> <a href="#request.conditionals">Conditionals</a></li>633 <li><a href="#rfc.section. 5.3">5.3</a> <a href="#request.conneg">Content Negotiation</a><ul>634 <li><a href="#rfc.section. 5.3.1">5.3.1</a> <a href="#quality.values">Quality Values</a></li>635 <li><a href="#rfc.section. 5.3.2">5.3.2</a> <a href="#header.accept">Accept</a></li>636 <li><a href="#rfc.section. 5.3.3">5.3.3</a> <a href="#header.accept-charset">Accept-Charset</a></li>637 <li><a href="#rfc.section. 5.3.4">5.3.4</a> <a href="#header.accept-encoding">Accept-Encoding</a></li>638 <li><a href="#rfc.section. 5.3.5">5.3.5</a> <a href="#header.accept-language">Accept-Language</a></li>648 <li><a href="#rfc.section.6.2">6.2</a> <a href="#request.conditionals">Conditionals</a></li> 649 <li><a href="#rfc.section.6.3">6.3</a> <a href="#request.conneg">Content Negotiation</a><ul> 650 <li><a href="#rfc.section.6.3.1">6.3.1</a> <a href="#quality.values">Quality Values</a></li> 651 <li><a href="#rfc.section.6.3.2">6.3.2</a> <a href="#header.accept">Accept</a></li> 652 <li><a href="#rfc.section.6.3.3">6.3.3</a> <a href="#header.accept-charset">Accept-Charset</a></li> 653 <li><a href="#rfc.section.6.3.4">6.3.4</a> <a href="#header.accept-encoding">Accept-Encoding</a></li> 654 <li><a href="#rfc.section.6.3.5">6.3.5</a> <a href="#header.accept-language">Accept-Language</a></li> 639 655 </ul> 640 656 </li> 641 <li><a href="#rfc.section. 5.4">5.4</a> <a href="#request.auth">Authentication</a></li>642 <li><a href="#rfc.section. 5.5">5.5</a> <a href="#request.context">Context</a><ul>643 <li><a href="#rfc.section. 5.5.1">5.5.1</a> <a href="#header.from">From</a></li>644 <li><a href="#rfc.section. 5.5.2">5.5.2</a> <a href="#header.referer">Referer</a></li>645 <li><a href="#rfc.section. 5.5.3">5.5.3</a> <a href="#header.user-agent">User-Agent</a></li>657 <li><a href="#rfc.section.6.4">6.4</a> <a href="#request.auth">Authentication Credentials</a></li> 658 <li><a href="#rfc.section.6.5">6.5</a> <a href="#request.context">Context</a><ul> 659 <li><a href="#rfc.section.6.5.1">6.5.1</a> <a href="#header.from">From</a></li> 660 <li><a href="#rfc.section.6.5.2">6.5.2</a> <a href="#header.referer">Referer</a></li> 661 <li><a href="#rfc.section.6.5.3">6.5.3</a> <a href="#header.user-agent">User-Agent</a></li> 646 662 </ul> 647 663 </li> 648 664 </ul> 649 665 </li> 650 <li><a href="#rfc.section. 6">6.</a> <a href="#status.codes">Response Status Codes</a><ul>651 <li><a href="#rfc.section. 6.1">6.1</a> <a href="#overview.of.status.codes">Overview of Status Codes</a></li>652 <li><a href="#rfc.section. 6.2">6.2</a> <a href="#status.1xx">Informational 1xx</a><ul>653 <li><a href="#rfc.section. 6.2.1">6.2.1</a> <a href="#status.100">100 Continue</a></li>654 <li><a href="#rfc.section. 6.2.2">6.2.2</a> <a href="#status.101">101 Switching Protocols</a></li>666 <li><a href="#rfc.section.7">7.</a> <a href="#status.codes">Response Status Codes</a><ul> 667 <li><a href="#rfc.section.7.1">7.1</a> <a href="#overview.of.status.codes">Overview of Status Codes</a></li> 668 <li><a href="#rfc.section.7.2">7.2</a> <a href="#status.1xx">Informational 1xx</a><ul> 669 <li><a href="#rfc.section.7.2.1">7.2.1</a> <a href="#status.100">100 Continue</a></li> 670 <li><a href="#rfc.section.7.2.2">7.2.2</a> <a href="#status.101">101 Switching Protocols</a></li> 655 671 </ul> 656 672 </li> 657 <li><a href="#rfc.section. 6.3">6.3</a> <a href="#status.2xx">Successful 2xx</a><ul>658 <li><a href="#rfc.section. 6.3.1">6.3.1</a> <a href="#status.200">200 OK</a></li>659 <li><a href="#rfc.section. 6.3.2">6.3.2</a> <a href="#status.201">201 Created</a></li>660 <li><a href="#rfc.section. 6.3.3">6.3.3</a> <a href="#status.202">202 Accepted</a></li>661 <li><a href="#rfc.section. 6.3.4">6.3.4</a> <a href="#status.203">203 Non-Authoritative Information</a></li>662 <li><a href="#rfc.section. 6.3.5">6.3.5</a> <a href="#status.204">204 No Content</a></li>663 <li><a href="#rfc.section. 6.3.6">6.3.6</a> <a href="#status.205">205 Reset Content</a></li>673 <li><a href="#rfc.section.7.3">7.3</a> <a href="#status.2xx">Successful 2xx</a><ul> 674 <li><a href="#rfc.section.7.3.1">7.3.1</a> <a href="#status.200">200 OK</a></li> 675 <li><a href="#rfc.section.7.3.2">7.3.2</a> <a href="#status.201">201 Created</a></li> 676 <li><a href="#rfc.section.7.3.3">7.3.3</a> <a href="#status.202">202 Accepted</a></li> 677 <li><a href="#rfc.section.7.3.4">7.3.4</a> <a href="#status.203">203 Non-Authoritative Information</a></li> 678 <li><a href="#rfc.section.7.3.5">7.3.5</a> <a href="#status.204">204 No Content</a></li> 679 <li><a href="#rfc.section.7.3.6">7.3.6</a> <a href="#status.205">205 Reset Content</a></li> 664 680 </ul> 665 681 </li> 666 <li><a href="#rfc.section. 6.4">6.4</a> <a href="#status.3xx">Redirection 3xx</a><ul>667 <li><a href="#rfc.section. 6.4.1">6.4.1</a> <a href="#status.300">300 Multiple Choices</a></li>668 <li><a href="#rfc.section. 6.4.2">6.4.2</a> <a href="#status.301">301 Moved Permanently</a></li>669 <li><a href="#rfc.section. 6.4.3">6.4.3</a> <a href="#status.302">302 Found</a></li>670 <li><a href="#rfc.section. 6.4.4">6.4.4</a> <a href="#status.303">303 See Other</a></li>671 <li><a href="#rfc.section. 6.4.5">6.4.5</a> <a href="#status.305">305 Use Proxy</a></li>672 <li><a href="#rfc.section. 6.4.6">6.4.6</a> <a href="#status.306">306 (Unused)</a></li>673 <li><a href="#rfc.section. 6.4.7">6.4.7</a> <a href="#status.307">307 Temporary Redirect</a></li>682 <li><a href="#rfc.section.7.4">7.4</a> <a href="#status.3xx">Redirection 3xx</a><ul> 683 <li><a href="#rfc.section.7.4.1">7.4.1</a> <a href="#status.300">300 Multiple Choices</a></li> 684 <li><a href="#rfc.section.7.4.2">7.4.2</a> <a href="#status.301">301 Moved Permanently</a></li> 685 <li><a href="#rfc.section.7.4.3">7.4.3</a> <a href="#status.302">302 Found</a></li> 686 <li><a href="#rfc.section.7.4.4">7.4.4</a> <a href="#status.303">303 See Other</a></li> 687 <li><a href="#rfc.section.7.4.5">7.4.5</a> <a href="#status.305">305 Use Proxy</a></li> 688 <li><a href="#rfc.section.7.4.6">7.4.6</a> <a href="#status.306">306 (Unused)</a></li> 689 <li><a href="#rfc.section.7.4.7">7.4.7</a> <a href="#status.307">307 Temporary Redirect</a></li> 674 690 </ul> 675 691 </li> 676 <li><a href="#rfc.section. 6.5">6.5</a> <a href="#status.4xx">Client Error 4xx</a><ul>677 <li><a href="#rfc.section. 6.5.1">6.5.1</a> <a href="#status.400">400 Bad Request</a></li>678 <li><a href="#rfc.section. 6.5.2">6.5.2</a> <a href="#status.402">402 Payment Required</a></li>679 <li><a href="#rfc.section. 6.5.3">6.5.3</a> <a href="#status.403">403 Forbidden</a></li>680 <li><a href="#rfc.section. 6.5.4">6.5.4</a> <a href="#status.404">404 Not Found</a></li>681 <li><a href="#rfc.section. 6.5.5">6.5.5</a> <a href="#status.405">405 Method Not Allowed</a></li>682 <li><a href="#rfc.section. 6.5.6">6.5.6</a> <a href="#status.406">406 Not Acceptable</a></li>683 <li><a href="#rfc.section. 6.5.7">6.5.7</a> <a href="#status.408">408 Request Timeout</a></li>684 <li><a href="#rfc.section. 6.5.8">6.5.8</a> <a href="#status.409">409 Conflict</a></li>685 <li><a href="#rfc.section. 6.5.9">6.5.9</a> <a href="#status.410">410 Gone</a></li>686 <li><a href="#rfc.section. 6.5.10">6.5.10</a> <a href="#status.411">411 Length Required</a></li>687 <li><a href="#rfc.section. 6.5.11">6.5.11</a> <a href="#status.413">413 Request Representation Too Large</a></li>688 <li><a href="#rfc.section. 6.5.12">6.5.12</a> <a href="#status.414">414 URI Too Long</a></li>689 <li><a href="#rfc.section. 6.5.13">6.5.13</a> <a href="#status.415">415 Unsupported Media Type</a></li>690 <li><a href="#rfc.section. 6.5.14">6.5.14</a> <a href="#status.417">417 Expectation Failed</a></li>691 <li><a href="#rfc.section. 6.5.15">6.5.15</a> <a href="#status.426">426 Upgrade Required</a></li>692 <li><a href="#rfc.section.7.5">7.5</a> <a href="#status.4xx">Client Error 4xx</a><ul> 693 <li><a href="#rfc.section.7.5.1">7.5.1</a> <a href="#status.400">400 Bad Request</a></li> 694 <li><a href="#rfc.section.7.5.2">7.5.2</a> <a href="#status.402">402 Payment Required</a></li> 695 <li><a href="#rfc.section.7.5.3">7.5.3</a> <a href="#status.403">403 Forbidden</a></li> 696 <li><a href="#rfc.section.7.5.4">7.5.4</a> <a href="#status.404">404 Not Found</a></li> 697 <li><a href="#rfc.section.7.5.5">7.5.5</a> <a href="#status.405">405 Method Not Allowed</a></li> 698 <li><a href="#rfc.section.7.5.6">7.5.6</a> <a href="#status.406">406 Not Acceptable</a></li> 699 <li><a href="#rfc.section.7.5.7">7.5.7</a> <a href="#status.408">408 Request Timeout</a></li> 700 <li><a href="#rfc.section.7.5.8">7.5.8</a> <a href="#status.409">409 Conflict</a></li> 701 <li><a href="#rfc.section.7.5.9">7.5.9</a> <a href="#status.410">410 Gone</a></li> 702 <li><a href="#rfc.section.7.5.10">7.5.10</a> <a href="#status.411">411 Length Required</a></li> 703 <li><a href="#rfc.section.7.5.11">7.5.11</a> <a href="#status.413">413 Request Representation Too Large</a></li> 704 <li><a href="#rfc.section.7.5.12">7.5.12</a> <a href="#status.414">414 URI Too Long</a></li> 705 <li><a href="#rfc.section.7.5.13">7.5.13</a> <a href="#status.415">415 Unsupported Media Type</a></li> 706 <li><a href="#rfc.section.7.5.14">7.5.14</a> <a href="#status.417">417 Expectation Failed</a></li> 707 <li><a href="#rfc.section.7.5.15">7.5.15</a> <a href="#status.426">426 Upgrade Required</a></li> 692 708 </ul> 693 709 </li> 694 <li><a href="#rfc.section. 6.6">6.6</a> <a href="#status.5xx">Server Error 5xx</a><ul>695 <li><a href="#rfc.section. 6.6.1">6.6.1</a> <a href="#status.500">500 Internal Server Error</a></li>696 <li><a href="#rfc.section. 6.6.2">6.6.2</a> <a href="#status.501">501 Not Implemented</a></li>697 <li><a href="#rfc.section. 6.6.3">6.6.3</a> <a href="#status.502">502 Bad Gateway</a></li>698 <li><a href="#rfc.section. 6.6.4">6.6.4</a> <a href="#status.503">503 Service Unavailable</a></li>699 <li><a href="#rfc.section. 6.6.5">6.6.5</a> <a href="#status.504">504 Gateway Timeout</a></li>700 <li><a href="#rfc.section. 6.6.6">6.6.6</a> <a href="#status.505">505 HTTP Version Not Supported</a></li>710 <li><a href="#rfc.section.7.6">7.6</a> <a href="#status.5xx">Server Error 5xx</a><ul> 711 <li><a href="#rfc.section.7.6.1">7.6.1</a> <a href="#status.500">500 Internal Server Error</a></li> 712 <li><a href="#rfc.section.7.6.2">7.6.2</a> <a href="#status.501">501 Not Implemented</a></li> 713 <li><a href="#rfc.section.7.6.3">7.6.3</a> <a href="#status.502">502 Bad Gateway</a></li> 714 <li><a href="#rfc.section.7.6.4">7.6.4</a> <a href="#status.503">503 Service Unavailable</a></li> 715 <li><a href="#rfc.section.7.6.5">7.6.5</a> <a href="#status.504">504 Gateway Timeout</a></li> 716 <li><a href="#rfc.section.7.6.6">7.6.6</a> <a href="#status.505">505 HTTP Version Not Supported</a></li> 701 717 </ul> 702 718 </li> 703 719 </ul> 704 720 </li> 705 <li><a href="#rfc.section.7">7.</a> <a href="#response.header.fields">Response Header Fields</a><ul> 706 <li><a href="#rfc.section.7.1">7.1</a> <a href="#response.control.data">Control Data</a><ul> 707 <li><a href="#rfc.section.7.1.1">7.1.1</a> <a href="#header.date">Date</a></li> 708 <li><a href="#rfc.section.7.1.2">7.1.2</a> <a href="#header.location">Location</a></li> 709 <li><a href="#rfc.section.7.1.3">7.1.3</a> <a href="#header.retry-after">Retry-After</a></li> 721 <li><a href="#rfc.section.8">8.</a> <a href="#response.header.fields">Response Header Fields</a><ul> 722 <li><a href="#rfc.section.8.1">8.1</a> <a href="#response.control.data">Control Data</a><ul> 723 <li><a href="#rfc.section.8.1.1">8.1.1</a> <a href="#origination.date">Origination Date</a><ul> 724 <li><a href="#rfc.section.8.1.1.1">8.1.1.1</a> <a href="#http.date">Date/Time Formats</a></li> 725 <li><a href="#rfc.section.8.1.1.2">8.1.1.2</a> <a href="#header.date">Date</a></li> 726 </ul> 727 </li> 728 <li><a href="#rfc.section.8.1.2">8.1.2</a> <a href="#header.location">Location</a></li> 729 <li><a href="#rfc.section.8.1.3">8.1.3</a> <a href="#header.retry-after">Retry-After</a></li> 710 730 </ul> 711 731 </li> 712 <li><a href="#rfc.section. 7.2">7.2</a> <a href="#selected.representation">Selected Representation Header Fields</a><ul>713 <li><a href="#rfc.section. 7.2.1">7.2.1</a> <a href="#header.vary">Vary</a></li>732 <li><a href="#rfc.section.8.2">8.2</a> <a href="#selected.representation">Selected Representation Header Fields</a><ul> 733 <li><a href="#rfc.section.8.2.1">8.2.1</a> <a href="#header.vary">Vary</a></li> 714 734 </ul> 715 735 </li> 716 <li><a href="#rfc.section. 7.3">7.3</a> <a href="#response.auth">Authentication Challenges</a></li>717 <li><a href="#rfc.section. 7.4">7.4</a> <a href="#response.inform">Informative</a><ul>718 <li><a href="#rfc.section. 7.4.1">7.4.1</a> <a href="#header.allow">Allow</a></li>719 <li><a href="#rfc.section. 7.4.2">7.4.2</a> <a href="#header.server">Server</a></li>736 <li><a href="#rfc.section.8.3">8.3</a> <a href="#response.auth">Authentication Challenges</a></li> 737 <li><a href="#rfc.section.8.4">8.4</a> <a href="#response.inform">Informative</a><ul> 738 <li><a href="#rfc.section.8.4.1">8.4.1</a> <a href="#header.allow">Allow</a></li> 739 <li><a href="#rfc.section.8.4.2">8.4.2</a> <a href="#header.server">Server</a></li> 720 740 </ul> 721 741 </li> 722 </ul>723 </li>724 <li><a href="#rfc.section.8">8.</a> <a href="#protocol.parameters">Protocol Parameters</a><ul>725 <li><a href="#rfc.section.8.1">8.1</a> <a href="#http.date">Date/Time Formats</a></li>726 <li><a href="#rfc.section.8.2">8.2</a> <a href="#product.tokens">Product Tokens</a></li>727 <li><a href="#rfc.section.8.3">8.3</a> <a href="#character.sets">Character Encodings (charset)</a></li>728 <li><a href="#rfc.section.8.4">8.4</a> <a href="#content.codings">Content Codings</a></li>729 <li><a href="#rfc.section.8.5">8.5</a> <a href="#media.types">Media Types</a><ul>730 <li><a href="#rfc.section.8.5.1">8.5.1</a> <a href="#canonicalization.and.text.defaults">Canonicalization and Text Defaults</a></li>731 <li><a href="#rfc.section.8.5.2">8.5.2</a> <a href="#multipart.types">Multipart Types</a></li>732 </ul>733 </li>734 <li><a href="#rfc.section.8.6">8.6</a> <a href="#language.tags">Language Tags</a></li>735 742 </ul> 736 743 </li> … … 840 847 </p> 841 848 <p id="rfc.section.1.p.2">HTTP provides a uniform interface for interacting with resources regardless of their type, nature, or implementation. HTTP 842 semantics includes the intentions defined by each request method (<a href="#methods" title="Request Methods">Section 4</a>), extensions to those semantics that might be described in request header fields (<a href="#request.header.fields" title="Request Header Fields">Section 5</a>), the meaning of status codes to indicate a machine-readable response (<a href="#status.codes" title="Response Status Codes">Section 6</a>), and other control data and resource metadata that might be given in response header fields (<a href="#response.header.fields" title="Response Header Fields">Section 7</a>).849 semantics includes the intentions defined by each request method (<a href="#methods" title="Request Methods">Section 5</a>), extensions to those semantics that might be described in request header fields (<a href="#request.header.fields" title="Request Header Fields">Section 6</a>), the meaning of status codes to indicate a machine-readable response (<a href="#status.codes" title="Response Status Codes">Section 7</a>), and other control data and resource metadata that might be given in response header fields (<a href="#response.header.fields" title="Response Header Fields">Section 8</a>). 843 850 </p> 844 851 <p id="rfc.section.1.p.3"><span id="rfc.iref.c.1"></span> In addition, this document defines the payload of messages (a.k.a., content), the associated metadata header fields that define … … 863 870 </p> 864 871 <p id="rfc.section.2.p.3">One design goal of HTTP is to separate resource identification from request semantics, which is made possible by vesting the 865 request semantics in the request method (<a href="#methods" title="Request Methods">Section 4</a>) and a few request-modifying header fields (<a href="#request.header.fields" title="Request Header Fields">Section 5</a>). Resource owners <em class="bcp14">SHOULD NOT</em> include request semantics within a URI, such as by specifying an action to invoke within the path or query components of the872 request semantics in the request method (<a href="#methods" title="Request Methods">Section 5</a>) and a few request-modifying header fields (<a href="#request.header.fields" title="Request Header Fields">Section 6</a>). Resource owners <em class="bcp14">SHOULD NOT</em> include request semantics within a URI, such as by specifying an action to invoke within the path or query components of the 866 873 effective request URI, unless those semantics are disabled when they are inconsistent with the request method. 867 874 </p> … … 877 884 (representation data). 878 885 </p> 879 <h2 id="rfc.section.3.1"><a href="#rfc.section.3.1">3.1</a> <a id="representation. header.fields" href="#representation.header.fields">Representation Header Fields</a></h2>886 <h2 id="rfc.section.3.1"><a href="#rfc.section.3.1">3.1</a> <a id="representation.metadata" href="#representation.metadata">Representation Metadata</a></h2> 880 887 <p id="rfc.section.3.1.p.1">Representation header fields provide metadata about the representation. When a message includes a payload body, the representation 881 888 header fields describe how to interpret the representation data enclosed in the payload body. In a response to a HEAD request, … … 883 890 same request had been a GET. 884 891 </p> 885 <p id="rfc.section.3.1.p.2">The following header fields are defined asrepresentation metadata:</p>892 <p id="rfc.section.3.1.p.2">The following header fields are defined to convey representation metadata:</p> 886 893 <div id="rfc.table.u.1"> 887 894 <table class="tt full left" cellpadding="3" cellspacing="0"> … … 895 902 <tr> 896 903 <td class="left">Content-Type</td> 897 <td class="left"><a href="#header.content-type" id="rfc.xref.header.content-type.1" title="Content-Type">Section 3.1.1 </a></td>904 <td class="left"><a href="#header.content-type" id="rfc.xref.header.content-type.1" title="Content-Type">Section 3.1.1.5</a></td> 898 905 </tr> 899 906 <tr> 900 907 <td class="left">Content-Encoding</td> 901 <td class="left"><a href="#header.content-encoding" id="rfc.xref.header.content-encoding.1" title="Content-Encoding">Section 3.1.2 </a></td>908 <td class="left"><a href="#header.content-encoding" id="rfc.xref.header.content-encoding.1" title="Content-Encoding">Section 3.1.2.2</a></td> 902 909 </tr> 903 910 <tr> 904 911 <td class="left">Content-Language</td> 905 <td class="left"><a href="#header.content-language" id="rfc.xref.header.content-language.1" title="Content-Language">Section 3.1.3 </a></td>912 <td class="left"><a href="#header.content-language" id="rfc.xref.header.content-language.1" title="Content-Language">Section 3.1.3.2</a></td> 906 913 </tr> 907 914 <tr> 908 915 <td class="left">Content-Location</td> 909 <td class="left"><a href="#header.content-location" id="rfc.xref.header.content-location.1" title="Content-Location">Section 3.1.4 </a></td>916 <td class="left"><a href="#header.content-location" id="rfc.xref.header.content-location.1" title="Content-Location">Section 3.1.4.2</a></td> 910 917 </tr> 911 918 <tr> … … 916 923 </table> 917 924 </div> 925 <h3 id="rfc.section.3.1.1"><a href="#rfc.section.3.1.1">3.1.1</a> <a id="data.type" href="#data.type">Data Type</a></h3> 926 <h4 id="rfc.section.3.1.1.1"><a href="#rfc.section.3.1.1.1">3.1.1.1</a> <a id="media.types" href="#media.types">Media Types</a></h4> 927 <p id="rfc.section.3.1.1.1.p.1">HTTP uses Internet Media Types <a href="#RFC2046" id="rfc.xref.RFC2046.1"><cite title="Multipurpose Internet Mail Extensions (MIME) Part Two: Media Types">[RFC2046]</cite></a> in the <a href="#header.content-type" class="smpl">Content-Type</a> (<a href="#header.content-type" id="rfc.xref.header.content-type.2" title="Content-Type">Section 3.1.1.5</a>) and <a href="#header.accept" class="smpl">Accept</a> (<a href="#header.accept" id="rfc.xref.header.accept.1" title="Accept">Section 6.3.2</a>) header fields in order to provide open and extensible data typing and type negotiation. 928 </p> 929 <div id="rfc.figure.u.1"></div><pre class="inline"><span id="rfc.iref.g.1"></span><span id="rfc.iref.g.2"></span><span id="rfc.iref.g.3"></span> <a href="#media.types" class="smpl">media-type</a> = <a href="#media.types" class="smpl">type</a> "/" <a href="#media.types" class="smpl">subtype</a> *( <a href="#imported.abnf" class="smpl">OWS</a> ";" <a href="#imported.abnf" class="smpl">OWS</a> <a href="#rule.parameter" class="smpl">parameter</a> ) 930 <a href="#media.types" class="smpl">type</a> = <a href="#imported.abnf" class="smpl">token</a> 931 <a href="#media.types" class="smpl">subtype</a> = <a href="#imported.abnf" class="smpl">token</a> 932 </pre><div id="rule.parameter"> 933 <p id="rfc.section.3.1.1.1.p.3"> The type/subtype <em class="bcp14">MAY</em> be followed by parameters in the form of attribute/value pairs. 934 </p> 935 </div> 936 <div id="rfc.figure.u.2"></div><pre class="inline"><span id="rfc.iref.g.4"></span><span id="rfc.iref.g.5"></span><span id="rfc.iref.g.6"></span> <a href="#rule.parameter" class="smpl">parameter</a> = <a href="#rule.parameter" class="smpl">attribute</a> "=" <a href="#rule.parameter" class="smpl">value</a> 937 <a href="#rule.parameter" class="smpl">attribute</a> = <a href="#imported.abnf" class="smpl">token</a> 938 <a href="#rule.parameter" class="smpl">value</a> = <a href="#imported.abnf" class="smpl">word</a> 939 </pre><p id="rfc.section.3.1.1.1.p.5">The type, subtype, and parameter attribute names are case-insensitive. Parameter values might or might not be case-sensitive, 940 depending on the semantics of the parameter name. The presence or absence of a parameter might be significant to the processing 941 of a media-type, depending on its definition within the media type registry. 942 </p> 943 <p id="rfc.section.3.1.1.1.p.6">A parameter value that matches the <a href="#imported.abnf" class="smpl">token</a> production can be transmitted as either a token or within a quoted-string. The quoted and unquoted values are equivalent. 944 </p> 945 <p id="rfc.section.3.1.1.1.p.7">Media-type values are registered with the Internet Assigned Number Authority (IANA). The media type registration process is 946 outlined in <a href="#RFC4288" id="rfc.xref.RFC4288.1"><cite title="Media Type Specifications and Registration Procedures">[RFC4288]</cite></a>. Use of non-registered media types is discouraged. 947 </p> 948 <h4 id="rfc.section.3.1.1.2"><a href="#rfc.section.3.1.1.2">3.1.1.2</a> <a id="character.sets" href="#character.sets">Character Encodings (charset)</a></h4> 949 <p id="rfc.section.3.1.1.2.p.1">HTTP uses charset names to indicate the character encoding of a textual representation.</p> 950 <div id="rule.charset"> 951 <p id="rfc.section.3.1.1.2.p.2"> A character encoding is identified by a case-insensitive token. The complete set of tokens is defined by the IANA Character 952 Set registry (<<a href="http://www.iana.org/assignments/character-sets">http://www.iana.org/assignments/character-sets</a>>). 953 </p> 954 </div> 955 <div id="rfc.figure.u.3"></div><pre class="inline"><span id="rfc.iref.g.7"></span> <a href="#rule.charset" class="smpl">charset</a> = <a href="#imported.abnf" class="smpl">token</a> 956 </pre><p id="rfc.section.3.1.1.2.p.4">Although HTTP allows an arbitrary token to be used as a charset value, any token that has a predefined value within the IANA 957 Character Set registry <em class="bcp14">MUST</em> represent the character encoding defined by that registry. Applications <em class="bcp14">SHOULD</em> limit their use of character encodings to those defined within the IANA registry. 958 </p> 959 <p id="rfc.section.3.1.1.2.p.5">HTTP uses charset in two contexts: within an <a href="#header.accept-charset" class="smpl">Accept-Charset</a> request header field (in which the charset value is an unquoted token) and as the value of a parameter in a <a href="#header.content-type" class="smpl">Content-Type</a> header field (within a request or response), in which case the parameter value of the charset parameter can be quoted. 960 </p> 961 <p id="rfc.section.3.1.1.2.p.6">Implementers need to be aware of IETF character set requirements <a href="#RFC3629" id="rfc.xref.RFC3629.1"><cite title="UTF-8, a transformation format of ISO 10646">[RFC3629]</cite></a> <a href="#RFC2277" id="rfc.xref.RFC2277.1"><cite title="IETF Policy on Character Sets and Languages">[RFC2277]</cite></a>. 962 </p> 963 <h4 id="rfc.section.3.1.1.3"><a href="#rfc.section.3.1.1.3">3.1.1.3</a> <a id="canonicalization.and.text.defaults" href="#canonicalization.and.text.defaults">Canonicalization and Text Defaults</a></h4> 964 <p id="rfc.section.3.1.1.3.p.1">Internet media types are registered with a canonical form. A representation transferred via HTTP messages <em class="bcp14">MUST</em> be in the appropriate canonical form prior to its transmission except for "text" types, as defined in the next paragraph. 965 </p> 966 <p id="rfc.section.3.1.1.3.p.2">When in canonical form, media subtypes of the "text" type use CRLF as the text line break. HTTP relaxes this requirement and 967 allows the transport of text media with plain CR or LF alone representing a line break when it is done consistently for an 968 entire representation. HTTP applications <em class="bcp14">MUST</em> accept CRLF, bare CR, and bare LF as indicating a line break in text media received via HTTP. In addition, if the text is 969 in a character encoding that does not use octets 13 and 10 for CR and LF respectively, as is the case for some multi-byte 970 character encodings, HTTP allows the use of whatever octet sequences are defined by that character encoding to represent the 971 equivalent of CR and LF for line breaks. This flexibility regarding line breaks applies only to text media in the payload 972 body; a bare CR or LF <em class="bcp14">MUST NOT</em> be substituted for CRLF within any of the HTTP control structures (such as header fields and multipart boundaries). 973 </p> 974 <p id="rfc.section.3.1.1.3.p.3">If a representation is encoded with a content-coding, the underlying data <em class="bcp14">MUST</em> be in a form defined above prior to being encoded. 975 </p> 976 <h4 id="rfc.section.3.1.1.4"><a href="#rfc.section.3.1.1.4">3.1.1.4</a> <a id="multipart.types" href="#multipart.types">Multipart Types</a></h4> 977 <p id="rfc.section.3.1.1.4.p.1">MIME provides for a number of "multipart" types — encapsulations of one or more representations within a single message body. 978 All multipart types share a common syntax, as defined in <a href="http://tools.ietf.org/html/rfc2046#section-5.1.1">Section 5.1.1</a> of <a href="#RFC2046" id="rfc.xref.RFC2046.2"><cite title="Multipurpose Internet Mail Extensions (MIME) Part Two: Media Types">[RFC2046]</cite></a>, and include a boundary parameter as part of the media type value. The message body is itself a protocol element; a sender <em class="bcp14">MUST</em> generate only CRLF to represent line breaks between body-parts. 979 </p> 980 <p id="rfc.section.3.1.1.4.p.2">In general, HTTP treats a multipart message body no differently than any other media type: strictly as payload. HTTP does 981 not use the multipart boundary as an indicator of message body length. In all other respects, an HTTP user agent <em class="bcp14">SHOULD</em> follow the same or similar behavior as a MIME user agent would upon receipt of a multipart type. The MIME header fields within 982 each body-part of a multipart message body do not have any significance to HTTP beyond that defined by their MIME semantics. 983 </p> 984 <p id="rfc.section.3.1.1.4.p.3">A recipient <em class="bcp14">MUST</em> treat an unrecognized multipart subtype as being equivalent to "multipart/mixed". 985 </p> 986 <div class="note" id="rfc.section.3.1.1.4.p.4"> 987 <p> <b>Note:</b> The "multipart/form-data" type has been specifically defined for carrying form data suitable for processing via the POST request 988 method, as described in <a href="#RFC2388" id="rfc.xref.RFC2388.1"><cite title="Returning Values from Forms: multipart/form-data">[RFC2388]</cite></a>. 989 </p> 990 </div> 918 991 <div id="rfc.iref.c.2"></div> 919 <h 3 id="rfc.section.3.1.1"><a href="#rfc.section.3.1.1">3.1.1</a> <a id="header.content-type" href="#header.content-type">Content-Type</a></h3>920 <p id="rfc.section.3.1.1. p.1">The "Content-Type" header field indicates the media type of the representation, which defines both the data format and how992 <h4 id="rfc.section.3.1.1.5"><a href="#rfc.section.3.1.1.5">3.1.1.5</a> <a id="header.content-type" href="#header.content-type">Content-Type</a></h4> 993 <p id="rfc.section.3.1.1.5.p.1">The "Content-Type" header field indicates the media type of the representation, which defines both the data format and how 921 994 that data <em class="bcp14">SHOULD</em> be processed by the recipient (within the scope of the request method semantics) after any <a href="#header.content-encoding" class="smpl">Content-Encoding</a> is decoded. For responses to the HEAD method, the media type is that which would have been sent had the request been a GET. 922 995 </p> 923 <div id="rfc.figure.u. 1"></div><pre class="inline"><span id="rfc.iref.g.1"></span> <a href="#header.content-type" class="smpl">Content-Type</a> = <a href="#media.types" class="smpl">media-type</a>924 </pre><p id="rfc.section.3.1.1. p.3">Media types are defined in <a href="#media.types" title="Media Types">Section 8.5</a>. An example of the field is925 </p> 926 <div id="rfc.figure.u. 2"></div><pre class="text"> Content-Type: text/html; charset=ISO-8859-4927 </pre><p id="rfc.section.3.1.1. p.5">A sender <em class="bcp14">SHOULD</em> include a Content-Type header field in a message containing a payload body, defining the media type of the enclosed representation,928 unless the intended media type is unknown to the sender. If a Content-Type header field is not present, recipients <em class="bcp14">MAY</em> either assume a media type of "application/octet-stream" (<a href="#RFC2046" id="rfc.xref.RFC2046. 1"><cite title="Multipurpose Internet Mail Extensions (MIME) Part Two: Media Types">[RFC2046]</cite></a>, <a href="http://tools.ietf.org/html/rfc2046#section-4.5.1">Section 4.5.1</a>) or examine the representation data to determine its type.929 </p> 930 <p id="rfc.section.3.1.1. p.6">In practice, resource owners do not always properly configure their origin server to provide the correct Content-Type for996 <div id="rfc.figure.u.4"></div><pre class="inline"><span id="rfc.iref.g.8"></span> <a href="#header.content-type" class="smpl">Content-Type</a> = <a href="#media.types" class="smpl">media-type</a> 997 </pre><p id="rfc.section.3.1.1.5.p.3">Media types are defined in <a href="#media.types" title="Media Types">Section 3.1.1.1</a>. An example of the field is 998 </p> 999 <div id="rfc.figure.u.5"></div><pre class="text"> Content-Type: text/html; charset=ISO-8859-4 1000 </pre><p id="rfc.section.3.1.1.5.p.5">A sender <em class="bcp14">SHOULD</em> include a Content-Type header field in a message containing a payload body, defining the media type of the enclosed representation, 1001 unless the intended media type is unknown to the sender. If a Content-Type header field is not present, recipients <em class="bcp14">MAY</em> either assume a media type of "application/octet-stream" (<a href="#RFC2046" id="rfc.xref.RFC2046.3"><cite title="Multipurpose Internet Mail Extensions (MIME) Part Two: Media Types">[RFC2046]</cite></a>, <a href="http://tools.ietf.org/html/rfc2046#section-4.5.1">Section 4.5.1</a>) or examine the representation data to determine its type. 1002 </p> 1003 <p id="rfc.section.3.1.1.5.p.6">In practice, resource owners do not always properly configure their origin server to provide the correct Content-Type for 931 1004 a given representation, with the result that some clients will examine a payload's content and override the specified type. 932 1005 Clients that do so risk drawing incorrect conclusions, which might expose additional security risks (e.g., "privilege escalation"). … … 935 1008 sniffing" when it is used. 936 1009 </p> 937 <div id="rfc.iref.c.3"></div> 938 <h3 id="rfc.section.3.1.2"><a href="#rfc.section.3.1.2">3.1.2</a> <a id="header.content-encoding" href="#header.content-encoding">Content-Encoding</a></h3> 939 <p id="rfc.section.3.1.2.p.1">The "Content-Encoding" header field indicates what content-codings have been applied to the representation beyond those inherent 1010 <h3 id="rfc.section.3.1.2"><a href="#rfc.section.3.1.2">3.1.2</a> <a id="data.encoding" href="#data.encoding">Data Encoding</a></h3> 1011 <h4 id="rfc.section.3.1.2.1"><a href="#rfc.section.3.1.2.1">3.1.2.1</a> <a id="content.codings" href="#content.codings">Content Codings</a></h4> 1012 <p id="rfc.section.3.1.2.1.p.1">Content coding values indicate an encoding transformation that has been or can be applied to a representation. Content codings 1013 are primarily used to allow a representation to be compressed or otherwise usefully transformed without losing the identity 1014 of its underlying media type and without loss of information. Frequently, the representation is stored in coded form, transmitted 1015 directly, and only decoded by the recipient. 1016 </p> 1017 <div id="rfc.figure.u.6"></div><pre class="inline"><span id="rfc.iref.g.9"></span> <a href="#content.codings" class="smpl">content-coding</a> = <a href="#imported.abnf" class="smpl">token</a> 1018 </pre><p id="rfc.section.3.1.2.1.p.3">All content-coding values are case-insensitive. HTTP/1.1 uses content-coding values in the <a href="#header.accept-encoding" class="smpl">Accept-Encoding</a> (<a href="#header.accept-encoding" id="rfc.xref.header.accept-encoding.1" title="Accept-Encoding">Section 6.3.4</a>) and <a href="#header.content-encoding" class="smpl">Content-Encoding</a> (<a href="#header.content-encoding" id="rfc.xref.header.content-encoding.2" title="Content-Encoding">Section 3.1.2.2</a>) header fields. Although the value describes the content-coding, what is more important is that it indicates what decoding 1019 mechanism will be required to remove the encoding. 1020 </p> 1021 <p id="rfc.section.3.1.2.1.p.4">compress<span id="rfc.iref.c.3"></span> 1022 </p> 1023 <ul class="empty"> 1024 <li>See <a href="p1-messaging.html#compress.coding" title="Compress Coding">Section 4.2.1</a> of <a href="#Part1" id="rfc.xref.Part1.7"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[Part1]</cite></a>. 1025 </li> 1026 </ul> 1027 <p id="rfc.section.3.1.2.1.p.5">deflate<span id="rfc.iref.d.1"></span> 1028 </p> 1029 <ul class="empty"> 1030 <li>See <a href="p1-messaging.html#deflate.coding" title="Deflate Coding">Section 4.2.2</a> of <a href="#Part1" id="rfc.xref.Part1.8"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[Part1]</cite></a>. 1031 </li> 1032 </ul> 1033 <p id="rfc.section.3.1.2.1.p.6">gzip<span id="rfc.iref.g.10"></span> 1034 </p> 1035 <ul class="empty"> 1036 <li>See <a href="p1-messaging.html#gzip.coding" title="Gzip Coding">Section 4.2.3</a> of <a href="#Part1" id="rfc.xref.Part1.9"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[Part1]</cite></a>. 1037 </li> 1038 </ul> 1039 <div id="rfc.iref.c.4"></div> 1040 <h4 id="rfc.section.3.1.2.2"><a href="#rfc.section.3.1.2.2">3.1.2.2</a> <a id="header.content-encoding" href="#header.content-encoding">Content-Encoding</a></h4> 1041 <p id="rfc.section.3.1.2.2.p.1">The "Content-Encoding" header field indicates what content-codings have been applied to the representation beyond those inherent 940 1042 in the media type, and thus what decoding mechanisms have to be applied in order to obtain the media-type referenced by the <a href="#header.content-type" class="smpl">Content-Type</a> header field. Content-Encoding is primarily used to allow a representation to be compressed without losing the identity of 941 1043 its underlying media type. 942 1044 </p> 943 <div id="rfc.figure.u. 3"></div><pre class="inline"><span id="rfc.iref.g.2"></span> <a href="#header.content-encoding" class="smpl">Content-Encoding</a> = 1#<a href="#content.codings" class="smpl">content-coding</a>944 </pre><p id="rfc.section.3.1.2. p.3">Content codings are defined in <a href="#content.codings" title="Content Codings">Section 8.4</a>. An example of its use is945 </p> 946 <div id="rfc.figure.u. 4"></div><pre class="text"> Content-Encoding: gzip947 </pre><p id="rfc.section.3.1.2. p.5">The content-coding is a characteristic of the representation. Typically, the representation data is stored with this encoding1045 <div id="rfc.figure.u.7"></div><pre class="inline"><span id="rfc.iref.g.11"></span> <a href="#header.content-encoding" class="smpl">Content-Encoding</a> = 1#<a href="#content.codings" class="smpl">content-coding</a> 1046 </pre><p id="rfc.section.3.1.2.2.p.3">Content codings are defined in <a href="#content.codings" title="Content Codings">Section 3.1.2.1</a>. An example of its use is 1047 </p> 1048 <div id="rfc.figure.u.8"></div><pre class="text"> Content-Encoding: gzip 1049 </pre><p id="rfc.section.3.1.2.2.p.5">The content-coding is a characteristic of the representation. Typically, the representation data is stored with this encoding 948 1050 and is only decoded before rendering or analogous usage. However, a transforming proxy <em class="bcp14">MAY</em> modify the content-coding if the new coding is known to be acceptable to the recipient, unless the "no-transform" cache-control 949 1051 directive is present in the message. 950 1052 </p> 951 <p id="rfc.section.3.1.2. p.6">If the media type includes an inherent encoding, such as a data format that is always compressed, then that encoding would1053 <p id="rfc.section.3.1.2.2.p.6">If the media type includes an inherent encoding, such as a data format that is always compressed, then that encoding would 952 1054 not be restated as a Content-Encoding even if it happens to be the same algorithm as one of the content-codings. Such a content-coding 953 1055 would only be listed if, for some bizarre reason, it is applied a second time to form the representation. Likewise, an origin … … 956 1058 as ..." dialog instead of automatic decompression and rendering of content). 957 1059 </p> 958 <p id="rfc.section.3.1.2.p.7">A representation that has a content-coding applied to it <em class="bcp14">MUST</em> include a Content-Encoding header field that lists the content-coding(s) applied. 959 </p> 960 <p id="rfc.section.3.1.2.p.8">If multiple encodings have been applied to a representation, the content codings <em class="bcp14">MUST</em> be listed in the order in which they were applied. Additional information about the encoding parameters <em class="bcp14">MAY</em> be provided by other header fields not defined by this specification. 961 </p> 962 <p id="rfc.section.3.1.2.p.9">If the content-coding of a representation in a request message is not acceptable to the origin server, the server <em class="bcp14">SHOULD</em> respond with a status code of 415 (Unsupported Media Type). 963 </p> 964 <div id="rfc.iref.c.4"></div> 965 <h3 id="rfc.section.3.1.3"><a href="#rfc.section.3.1.3">3.1.3</a> <a id="header.content-language" href="#header.content-language">Content-Language</a></h3> 966 <p id="rfc.section.3.1.3.p.1">The "Content-Language" header field describes the natural language(s) of the intended audience for the representation. Note 1060 <p id="rfc.section.3.1.2.2.p.7">A representation that has a content-coding applied to it <em class="bcp14">MUST</em> include a Content-Encoding header field that lists the content-coding(s) applied. 1061 </p> 1062 <p id="rfc.section.3.1.2.2.p.8">If multiple encodings have been applied to a representation, the content codings <em class="bcp14">MUST</em> be listed in the order in which they were applied. Additional information about the encoding parameters <em class="bcp14">MAY</em> be provided by other header fields not defined by this specification. 1063 </p> 1064 <p id="rfc.section.3.1.2.2.p.9">If the content-coding of a representation in a request message is not acceptable to the origin server, the server <em class="bcp14">SHOULD</em> respond with a status code of 415 (Unsupported Media Type). 1065 </p> 1066 <h3 id="rfc.section.3.1.3"><a href="#rfc.section.3.1.3">3.1.3</a> <a id="audience.language" href="#audience.language">Audience Language</a></h3> 1067 <h4 id="rfc.section.3.1.3.1"><a href="#rfc.section.3.1.3.1">3.1.3.1</a> <a id="language.tags" href="#language.tags">Language Tags</a></h4> 1068 <p id="rfc.section.3.1.3.1.p.1">A language tag, as defined in <a href="#RFC5646" id="rfc.xref.RFC5646.1"><cite title="Tags for Identifying Languages">[RFC5646]</cite></a>, identifies a natural language spoken, written, or otherwise conveyed by human beings for communication of information to 1069 other human beings. Computer languages are explicitly excluded. HTTP uses language tags within the <a href="#header.accept-language" class="smpl">Accept-Language</a> and <a href="#header.content-language" class="smpl">Content-Language</a> fields. 1070 </p> 1071 <p id="rfc.section.3.1.3.1.p.2">In summary, a language tag is composed of one or more parts: A primary language subtag followed by a possibly empty series 1072 of subtags: 1073 </p> 1074 <div id="rfc.figure.u.9"></div><pre class="inline"><span id="rfc.iref.g.12"></span> <a href="#language.tags" class="smpl">language-tag</a> = <Language-Tag, defined in <a href="#RFC5646" id="rfc.xref.RFC5646.2"><cite title="Tags for Identifying Languages">[RFC5646]</cite></a>, <a href="http://tools.ietf.org/html/rfc5646#section-2.1">Section 2.1</a>> 1075 </pre><p id="rfc.section.3.1.3.1.p.4">White space is not allowed within the tag and all tags are case-insensitive. The name space of language subtags is administered 1076 by the IANA (see <<a href="http://www.iana.org/assignments/language-subtag-registry">http://www.iana.org/assignments/language-subtag-registry</a>>). 1077 </p> 1078 <div id="rfc.figure.u.10"></div> 1079 <p>Example tags include:</p> <pre class="text"> en, en-US, es-419, az-Arab, x-pig-latin, man-Nkoo-GN 1080 </pre> <p id="rfc.section.3.1.3.1.p.6">See <a href="#RFC5646" id="rfc.xref.RFC5646.3"><cite title="Tags for Identifying Languages">[RFC5646]</cite></a> for further information. 1081 </p> 1082 <div id="rfc.iref.c.5"></div> 1083 <h4 id="rfc.section.3.1.3.2"><a href="#rfc.section.3.1.3.2">3.1.3.2</a> <a id="header.content-language" href="#header.content-language">Content-Language</a></h4> 1084 <p id="rfc.section.3.1.3.2.p.1">The "Content-Language" header field describes the natural language(s) of the intended audience for the representation. Note 967 1085 that this might not be equivalent to all the languages used within the representation. 968 1086 </p> 969 <div id="rfc.figure.u. 5"></div><pre class="inline"><span id="rfc.iref.g.3"></span> <a href="#header.content-language" class="smpl">Content-Language</a> = 1#<a href="#language.tags" class="smpl">language-tag</a>970 </pre><p id="rfc.section.3.1.3. p.3">Language tags are defined in <a href="#language.tags" title="Language Tags">Section 8.6</a>. The primary purpose of Content-Language is to allow a user to identify and differentiate representations according to the1087 <div id="rfc.figure.u.11"></div><pre class="inline"><span id="rfc.iref.g.13"></span> <a href="#header.content-language" class="smpl">Content-Language</a> = 1#<a href="#language.tags" class="smpl">language-tag</a> 1088 </pre><p id="rfc.section.3.1.3.2.p.3">Language tags are defined in <a href="#language.tags" title="Language Tags">Section 3.1.3.1</a>. The primary purpose of Content-Language is to allow a user to identify and differentiate representations according to the 971 1089 user's own preferred language. Thus, if the content is intended only for a Danish-literate audience, the appropriate field 972 1090 is 973 1091 </p> 974 <div id="rfc.figure.u. 6"></div><pre class="text"> Content-Language: da975 </pre><p id="rfc.section.3.1.3. p.5">If no Content-Language is specified, the default is that the content is intended for all language audiences. This might mean1092 <div id="rfc.figure.u.12"></div><pre class="text"> Content-Language: da 1093 </pre><p id="rfc.section.3.1.3.2.p.5">If no Content-Language is specified, the default is that the content is intended for all language audiences. This might mean 976 1094 that the sender does not consider it to be specific to any natural language, or that the sender does not know for which language 977 1095 it is intended. 978 1096 </p> 979 <p id="rfc.section.3.1.3. p.6">Multiple languages <em class="bcp14">MAY</em> be listed for content that is intended for multiple audiences. For example, a rendition of the "Treaty of Waitangi", presented1097 <p id="rfc.section.3.1.3.2.p.6">Multiple languages <em class="bcp14">MAY</em> be listed for content that is intended for multiple audiences. For example, a rendition of the "Treaty of Waitangi", presented 980 1098 simultaneously in the original Maori and English versions, would call for 981 1099 </p> 982 <div id="rfc.figure.u. 7"></div><pre class="text"> Content-Language: mi, en983 </pre><p id="rfc.section.3.1.3. p.8">However, just because multiple languages are present within a representation does not mean that it is intended for multiple1100 <div id="rfc.figure.u.13"></div><pre class="text"> Content-Language: mi, en 1101 </pre><p id="rfc.section.3.1.3.2.p.8">However, just because multiple languages are present within a representation does not mean that it is intended for multiple 984 1102 linguistic audiences. An example would be a beginner's language primer, such as "A First Lesson in Latin", which is clearly 985 1103 intended to be used by an English-literate audience. In this case, the Content-Language would properly only include "en". 986 1104 </p> 987 <p id="rfc.section.3.1.3.p.9">Content-Language <em class="bcp14">MAY</em> be applied to any media type — it is not limited to textual documents. 988 </p> 989 <div id="rfc.iref.c.5"></div> 990 <h3 id="rfc.section.3.1.4"><a href="#rfc.section.3.1.4">3.1.4</a> <a id="header.content-location" href="#header.content-location">Content-Location</a></h3> 991 <p id="rfc.section.3.1.4.p.1">The "Content-Location" header field supplies a URI that can be used as a specific identifier for the representation in this 1105 <p id="rfc.section.3.1.3.2.p.9">Content-Language <em class="bcp14">MAY</em> be applied to any media type — it is not limited to textual documents. 1106 </p> 1107 <h3 id="rfc.section.3.1.4"><a href="#rfc.section.3.1.4">3.1.4</a> <a id="identification" href="#identification">Identification</a></h3> 1108 <h4 id="rfc.section.3.1.4.1"><a href="#rfc.section.3.1.4.1">3.1.4.1</a> <a id="identifying.payload" href="#identifying.payload">Identifying the Payload</a></h4> 1109 <p id="rfc.section.3.1.4.1.p.1">When a complete or partial representation is transferred in a message payload, it is often desirable for the sender to supply, 1110 or the recipient to determine, an identifier for the resource corresponding to that representation. 1111 </p> 1112 <p id="rfc.section.3.1.4.1.p.2">The following rules are used to determine such a URI for the payload of a request message: </p> 1113 <ul> 1114 <li>If the request has a <a href="#header.content-location" class="smpl">Content-Location</a> header field, then the sender asserts that the payload is a representation of the resource identified by the Content-Location 1115 field-value. However, such an assertion cannot be trusted unless it can be verified by other means (not defined by HTTP). 1116 The information might still be useful for revision history links. 1117 </li> 1118 <li>Otherwise, the payload is unidentified.</li> 1119 </ul> 1120 <p id="rfc.section.3.1.4.1.p.3">The following rules, to be applied in order until a match is found, are used to determine such a URI for the payload of a 1121 response message: 1122 </p> 1123 <ol> 1124 <li>If the request is GET or HEAD and the response status code is <a href="#status.200" class="smpl">200 (OK)</a>, <a href="#status.204" class="smpl">204 (No Content)</a>, <a href="p5-range.html#status.206" class="smpl">206 (Partial Content)</a>, or <a href="p4-conditional.html#status.304" class="smpl">304 (Not Modified)</a>, the payload's identifier is the effective request URI (<a href="p1-messaging.html#effective.request.uri" title="Effective Request URI">Section 5.5</a> of <a href="#Part1" id="rfc.xref.Part1.10"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[Part1]</cite></a>). 1125 </li> 1126 <li>If the request is GET or HEAD and the response status code is <a href="#status.203" class="smpl">203 (Non-Authoritative Information)</a>, the payload is a potentially modified representation of the target resource; as such, the effective request URI might only 1127 act as an identifier for the payload's representation when a request is made via the same chain of intermediaries. 1128 </li> 1129 <li>If the response has a <a href="#header.content-location" class="smpl">Content-Location</a> header field and its field-value is a reference to the same URI as the effective request URI, the payload's identifier is 1130 the effective request URI. 1131 </li> 1132 <li>If the response has a <a href="#header.content-location" class="smpl">Content-Location</a> header field and its field-value is a reference to a URI different from the effective request URI, then the sender asserts 1133 that the payload is a representation of the resource identified by the Content-Location field-value. However, such an assertion 1134 cannot be trusted unless it can be verified by other means (not defined by HTTP). 1135 </li> 1136 <li>Otherwise, the payload is unidentified.</li> 1137 </ol> 1138 <div id="rfc.iref.c.6"></div> 1139 <h4 id="rfc.section.3.1.4.2"><a href="#rfc.section.3.1.4.2">3.1.4.2</a> <a id="header.content-location" href="#header.content-location">Content-Location</a></h4> 1140 <p id="rfc.section.3.1.4.2.p.1">The "Content-Location" header field supplies a URI that can be used as a specific identifier for the representation in this 992 1141 message. In other words, if one were to perform a GET on this URI at the time of this message's generation, then a <a href="#status.200" class="smpl">200 (OK)</a> response would contain the same representation that is enclosed as payload in this message. 993 1142 </p> 994 <div id="rfc.figure.u. 8"></div><pre class="inline"><span id="rfc.iref.g.4"></span> <a href="#header.content-location" class="smpl">Content-Location</a> = <a href="#imported.abnf" class="smpl">absolute-URI</a> / <a href="#imported.abnf" class="smpl">partial-URI</a>995 </pre><p id="rfc.section.3.1.4. p.3">The Content-Location value is not a replacement for the effective Request URI (<a href="p1-messaging.html#effective.request.uri" title="Effective Request URI">Section 5.5</a> of <a href="#Part1" id="rfc.xref.Part1.7"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[Part1]</cite></a>). It is representation metadata. It has the same syntax and semantics as the header field of the same name defined for MIME1143 <div id="rfc.figure.u.14"></div><pre class="inline"><span id="rfc.iref.g.14"></span> <a href="#header.content-location" class="smpl">Content-Location</a> = <a href="#imported.abnf" class="smpl">absolute-URI</a> / <a href="#imported.abnf" class="smpl">partial-URI</a> 1144 </pre><p id="rfc.section.3.1.4.2.p.3">The Content-Location value is not a replacement for the effective Request URI (<a href="p1-messaging.html#effective.request.uri" title="Effective Request URI">Section 5.5</a> of <a href="#Part1" id="rfc.xref.Part1.11"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[Part1]</cite></a>). It is representation metadata. It has the same syntax and semantics as the header field of the same name defined for MIME 996 1145 body parts in <a href="http://tools.ietf.org/html/rfc2557#section-4">Section 4</a> of <a href="#RFC2557" id="rfc.xref.RFC2557.1"><cite title="MIME Encapsulation of Aggregate Documents, such as HTML (MHTML)">[RFC2557]</cite></a>. However, its appearance in an HTTP message has some special implications for HTTP recipients. 997 1146 </p> 998 <p id="rfc.section.3.1.4. p.4">If Content-Location is included in a response message and its value is the same as the effective request URI, then the response1147 <p id="rfc.section.3.1.4.2.p.4">If Content-Location is included in a response message and its value is the same as the effective request URI, then the response 999 1148 payload <em class="bcp14">SHOULD</em> be considered a current representation of that resource. For a GET or HEAD request, this is the same as the default semantics 1000 1149 when no Content-Location is provided by the server. For a state-changing request like PUT or POST, it implies that the server's … … 1003 1152 need for a subsequent GET request. 1004 1153 </p> 1005 <p id="rfc.section.3.1.4. p.5">If Content-Location is included in a response message and its value differs from the effective request URI, then the origin1154 <p id="rfc.section.3.1.4.2.p.5">If Content-Location is included in a response message and its value differs from the effective request URI, then the origin 1006 1155 server is informing recipients that this representation has its own, presumably more specific, identifier. For a GET or HEAD 1007 1156 request, this is an indication that the effective request URI identifies a resource that is subject to content negotiation … … 1011 1160 the payload of the <a href="#status.200" class="smpl">200 (OK)</a> response; the Content-Location value provides an identifier for retrieving a copy of that same receipt in the future. 1012 1161 </p> 1013 <p id="rfc.section.3.1.4. p.6">If Content-Location is included in a request message, then it <em class="bcp14">MAY</em> be interpreted by the origin server as an indication of where the user agent originally obtained the content of the enclosed1162 <p id="rfc.section.3.1.4.2.p.6">If Content-Location is included in a request message, then it <em class="bcp14">MAY</em> be interpreted by the origin server as an indication of where the user agent originally obtained the content of the enclosed 1014 1163 representation (prior to any subsequent modification of the content by that user agent). In other words, the user agent is 1015 1164 providing the same representation metadata that it received with the original representation. However, such interpretation <em class="bcp14">MUST NOT</em> be used to alter the semantics of the method requested by the client. For example, if a client makes a PUT request on a negotiated … … 1019 1168 latter semantics, it would have applied the PUT directly to the Content-Location URI. 1020 1169 </p> 1021 <p id="rfc.section.3.1.4. p.7">A Content-Location field received in a request message is transitory information that <em class="bcp14">SHOULD NOT</em> be saved with other representation metadata for use in later responses. The Content-Location's value might be saved for use1170 <p id="rfc.section.3.1.4.2.p.7">A Content-Location field received in a request message is transitory information that <em class="bcp14">SHOULD NOT</em> be saved with other representation metadata for use in later responses. The Content-Location's value might be saved for use 1022 1171 in other contexts, such as within source links or other metadata. 1023 1172 </p> 1024 <p id="rfc.section.3.1.4. p.8">A cache cannot assume that a representation with a Content-Location different from the URI used to retrieve it can be used1173 <p id="rfc.section.3.1.4.2.p.8">A cache cannot assume that a representation with a Content-Location different from the URI used to retrieve it can be used 1025 1174 to respond to later requests on that Content-Location URI. 1026 1175 </p> 1027 <p id="rfc.section.3.1.4. p.9">If the Content-Location value is a partial URI, the partial URI is interpreted relative to the effective request URI.</p>1176 <p id="rfc.section.3.1.4.2.p.9">If the Content-Location value is a partial URI, the partial URI is interpreted relative to the effective request URI.</p> 1028 1177 <h2 id="rfc.section.3.2"><a href="#rfc.section.3.2">3.2</a> <a id="representation.data" href="#representation.data">Representation Data</a></h2> 1029 1178 <p id="rfc.section.3.2.p.1">The representation data associated with an HTTP message is either provided as the payload body of the message or referred … … 1033 1182 <p id="rfc.section.3.2.p.2">The data type of the representation data is determined via the header fields <a href="#header.content-type" class="smpl">Content-Type</a> and <a href="#header.content-encoding" class="smpl">Content-Encoding</a>. These define a two-layer, ordered encoding model: 1034 1183 </p> 1035 <div id="rfc.figure.u. 9"></div><pre class="text"> representation-data := Content-Encoding( Content-Type( bits ) )1184 <div id="rfc.figure.u.15"></div><pre class="text"> representation-data := Content-Encoding( Content-Type( bits ) ) 1036 1185 </pre><div id="rfc.iref.p.1"></div> 1037 <h2 id="rfc.section.3.3"><a href="#rfc.section.3.3">3.3</a> <a id="payload" href="#payload"> Message Payload</a></h2>1186 <h2 id="rfc.section.3.3"><a href="#rfc.section.3.3">3.3</a> <a id="payload" href="#payload">Payload Semantics</a></h2> 1038 1187 <p id="rfc.section.3.3.p.1">Some HTTP messages transfer a complete or partial representation as the message "<dfn>payload</dfn>". In some cases, a payload might only contain the associated representation's header fields (e.g., responses to HEAD) or 1039 1188 only some part(s) of the representation data (e.g., the <a href="p5-range.html#status.206" class="smpl">206 (Partial Content)</a> status code). … … 1042 1191 by both the request method and the response status code. 1043 1192 </p> 1044 <p id="rfc.section.3.3.p.3">For example, a representation in the payload of a PUT request (<a href="#PUT" id="rfc.xref.PUT.1" title="PUT">Section 4.3.4</a>) represents the desired state of the target resource if the request is successfully applied, whereas a representation in1045 the payload of a POST request (<a href="#POST" id="rfc.xref.POST.1" title="POST">Section 4.3.3</a>) represents an anonymous resource for providing data to be processed, such as the information that a user entered within1193 <p id="rfc.section.3.3.p.3">For example, a representation in the payload of a PUT request (<a href="#PUT" id="rfc.xref.PUT.1" title="PUT">Section 5.3.4</a>) represents the desired state of the target resource if the request is successfully applied, whereas a representation in 1194 the payload of a POST request (<a href="#POST" id="rfc.xref.POST.1" title="POST">Section 5.3.3</a>) represents an anonymous resource for providing data to be processed, such as the information that a user entered within 1046 1195 an HTML form. 1047 1196 </p> 1048 <p id="rfc.section.3.3.p.4">Likewise, the payload of a <a href="#status.200" class="smpl">200 (OK)</a> response to GET (<a href="#GET" id="rfc.xref.GET.1" title="GET">Section 4.3.1</a>) contains a representation of the target resource, as observed at the time of the message origination date (<a href="#header.date" id="rfc.xref.header.date.1" title="Date">Section 7.1.1</a>), whereas the same status code in a response to POST might contain either a representation of the processing result or a1197 <p id="rfc.section.3.3.p.4">Likewise, the payload of a <a href="#status.200" class="smpl">200 (OK)</a> response to GET (<a href="#GET" id="rfc.xref.GET.1" title="GET">Section 5.3.1</a>) contains a representation of the target resource, as observed at the time of the message origination date (<a href="#header.date" id="rfc.xref.header.date.1" title="Date">Section 8.1.1.2</a>), whereas the same status code in a response to POST might contain either a representation of the processing result or a 1049 1198 current representation of the target resource after applying the processing. Response messages with an error status code usually 1050 1199 contain a representation that describes the error and what next steps are suggested for resolving it. 1051 1200 </p> 1052 <h3 id="rfc.section.3.3.1"><a href="#rfc.section.3.3.1">3.3.1</a> <a id="payload.header.fields" href="#payload.header.fields">Payload Header Fields</a></h3> 1053 <p id="rfc.section.3.3.1.p.1">Header fields that specifically describe the payload, rather than the associated representation, are referred to as "payload 1201 <p id="rfc.section.3.3.p.5">Header fields that specifically describe the payload, rather than the associated representation, are referred to as "payload 1054 1202 header fields". Payload header fields are defined in other parts of this specification, due to their impact on message parsing. 1055 1203 </p> … … 1065 1213 <tr> 1066 1214 <td class="left">Content-Length</td> 1067 <td class="left"><a href="p1-messaging.html#header.content-length" title="Content-Length">Section 3.3.2</a> of <a href="#Part1" id="rfc.xref.Part1. 8"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[Part1]</cite></a></td>1215 <td class="left"><a href="p1-messaging.html#header.content-length" title="Content-Length">Section 3.3.2</a> of <a href="#Part1" id="rfc.xref.Part1.12"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[Part1]</cite></a></td> 1068 1216 </tr> 1069 1217 <tr> … … 1073 1221 <tr> 1074 1222 <td class="left">Transfer-Encoding</td> 1075 <td class="left"><a href="p1-messaging.html#header.transfer-encoding" title="Transfer-Encoding">Section 3.3.1</a> of <a href="#Part1" id="rfc.xref.Part1. 9"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[Part1]</cite></a></td>1223 <td class="left"><a href="p1-messaging.html#header.transfer-encoding" title="Transfer-Encoding">Section 3.3.1</a> of <a href="#Part1" id="rfc.xref.Part1.13"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[Part1]</cite></a></td> 1076 1224 </tr> 1077 1225 </tbody> 1078 1226 </table> 1079 1227 </div> 1080 <h3 id="rfc.section.3.3.2"><a href="#rfc.section.3.3.2">3.3.2</a> <a id="identifying.payload" href="#identifying.payload">Identifying the Payload</a></h3>1081 <p id="rfc.section.3.3.2.p.1">When a complete or partial representation is transferred in a message payload, it is often desirable for the sender to supply,1082 or the recipient to determine, an identifier for the resource corresponding to that representation.1083 </p>1084 <p id="rfc.section.3.3.2.p.2">The following rules are used to determine such a URI for the payload of a request message: </p>1085 <ul>1086 <li>If the request has a <a href="#header.content-location" class="smpl">Content-Location</a> header field, then the sender asserts that the payload is a representation of the resource identified by the Content-Location1087 field-value. However, such an assertion cannot be trusted unless it can be verified by other means (not defined by HTTP).1088 The information might still be useful for revision history links.1089 </li>1090 <li>Otherwise, the payload is unidentified.</li>1091 </ul>1092 <p id="rfc.section.3.3.2.p.3">The following rules, to be applied in order until a match is found, are used to determine such a URI for the payload of a1093 response message:1094 </p>1095 <ol>1096 <li>If the request is GET or HEAD and the response status code is <a href="#status.200" class="smpl">200 (OK)</a>, <a href="#status.204" class="smpl">204 (No Content)</a>, <a href="p5-range.html#status.206" class="smpl">206 (Partial Content)</a>, or <a href="p4-conditional.html#status.304" class="smpl">304 (Not Modified)</a>, the payload's identifier is the effective request URI (<a href="p1-messaging.html#effective.request.uri" title="Effective Request URI">Section 5.5</a> of <a href="#Part1" id="rfc.xref.Part1.10"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[Part1]</cite></a>).1097 </li>1098 <li>If the request is GET or HEAD and the response status code is <a href="#status.203" class="smpl">203 (Non-Authoritative Information)</a>, the payload is a potentially modified representation of the target resource; as such, the effective request URI might only1099 act as an identifier for the payload's representation when a request is made via the same chain of intermediaries.1100 </li>1101 <li>If the response has a <a href="#header.content-location" class="smpl">Content-Location</a> header field and its field-value is a reference to the same URI as the effective request URI, the payload's identifier is1102 the effective request URI.1103 </li>1104 <li>If the response has a <a href="#header.content-location" class="smpl">Content-Location</a> header field and its field-value is a reference to a URI different from the effective request URI, then the sender asserts1105 that the payload is a representation of the resource identified by the Content-Location field-value. However, such an assertion1106 cannot be trusted unless it can be verified by other means (not defined by HTTP).1107 </li>1108 <li>Otherwise, the payload is unidentified.</li>1109 </ol>1110 1228 <h2 id="rfc.section.3.4"><a href="#rfc.section.3.4">3.4</a> <a id="content.negotiation" href="#content.negotiation">Content Negotiation</a></h2> 1111 1229 <p id="rfc.section.3.4.p.1">HTTP responses include a representation which contains information for interpretation, whether by a human user or for further … … 1161 1279 </p> 1162 1280 <p id="rfc.section.3.4.1.p.5">HTTP/1.1 includes the following header fields for enabling proactive negotiation through description of user agent capabilities 1163 and user preferences: <a href="#header.accept" class="smpl">Accept</a> (<a href="#header.accept" id="rfc.xref.header.accept. 1" title="Accept">Section 5.3.2</a>), <a href="#header.accept-charset" class="smpl">Accept-Charset</a> (<a href="#header.accept-charset" id="rfc.xref.header.accept-charset.1" title="Accept-Charset">Section 5.3.3</a>), <a href="#header.accept-encoding" class="smpl">Accept-Encoding</a> (<a href="#header.accept-encoding" id="rfc.xref.header.accept-encoding.1" title="Accept-Encoding">Section 5.3.4</a>), <a href="#header.accept-language" class="smpl">Accept-Language</a> (<a href="#header.accept-language" id="rfc.xref.header.accept-language.1" title="Accept-Language">Section 5.3.5</a>), and <a href="#header.user-agent" class="smpl">User-Agent</a> (<a href="#header.user-agent" id="rfc.xref.header.user-agent.1" title="User-Agent">Section 5.5.3</a>). However, an origin server is not limited to these dimensions and <em class="bcp14">MAY</em> vary the response based on any aspect of the request, including aspects of the connection (e.g., IP address) or information1281 and user preferences: <a href="#header.accept" class="smpl">Accept</a> (<a href="#header.accept" id="rfc.xref.header.accept.2" title="Accept">Section 6.3.2</a>), <a href="#header.accept-charset" class="smpl">Accept-Charset</a> (<a href="#header.accept-charset" id="rfc.xref.header.accept-charset.1" title="Accept-Charset">Section 6.3.3</a>), <a href="#header.accept-encoding" class="smpl">Accept-Encoding</a> (<a href="#header.accept-encoding" id="rfc.xref.header.accept-encoding.2" title="Accept-Encoding">Section 6.3.4</a>), <a href="#header.accept-language" class="smpl">Accept-Language</a> (<a href="#header.accept-language" id="rfc.xref.header.accept-language.1" title="Accept-Language">Section 6.3.5</a>), and <a href="#header.user-agent" class="smpl">User-Agent</a> (<a href="#header.user-agent" id="rfc.xref.header.user-agent.1" title="User-Agent">Section 6.5.3</a>). However, an origin server is not limited to these dimensions and <em class="bcp14">MAY</em> vary the response based on any aspect of the request, including aspects of the connection (e.g., IP address) or information 1164 1282 within extension header fields not defined by this specification. 1165 1283 </p> … … 1168 1286 </p> 1169 1287 </div> 1170 <p id="rfc.section.3.4.1.p.7">The <a href="#header.vary" class="smpl">Vary</a> header field (<a href="#header.vary" id="rfc.xref.header.vary.1" title="Vary">Section 7.2.1</a>) can be used to express the parameters the server uses to select a representation that is subject to proactive negotiation.1288 <p id="rfc.section.3.4.1.p.7">The <a href="#header.vary" class="smpl">Vary</a> header field (<a href="#header.vary" id="rfc.xref.header.vary.1" title="Vary">Section 8.2.1</a>) can be used to express the parameters the server uses to select a representation that is subject to proactive negotiation. 1171 1289 </p> 1172 1290 <h3 id="rfc.section.3.4.2"><a href="#rfc.section.3.4.2">3.4.2</a> <a id="reactive.negotiation" href="#reactive.negotiation">Reactive Negotiation</a></h3> … … 1189 1307 proactive negotiation. 1190 1308 </p> 1191 <h1 id="rfc.section.4"><a href="#rfc.section.4">4.</a> <a id="methods" href="#methods">Request Methods</a></h1> 1192 <h2 id="rfc.section.4.1"><a href="#rfc.section.4.1">4.1</a> <a id="method.overview" href="#method.overview">Overview</a></h2> 1193 <p id="rfc.section.4.1.p.1">The request method token is the primary source of request semantics; it indicates the purpose for which the client has made 1194 this request and what is expected by the client as a successful result. The request semantics <em class="bcp14">MAY</em> be further specialized by the semantics of some header fields when present in a request (<a href="#request.header.fields" title="Request Header Fields">Section 5</a>) if those additional semantics do not conflict with the method. 1195 </p> 1196 <div id="rfc.figure.u.10"></div><pre class="inline"><span id="rfc.iref.g.5"></span> <a href="#method.overview" class="smpl">method</a> = <a href="#imported.abnf" class="smpl">token</a> 1197 </pre><p id="rfc.section.4.1.p.3">HTTP was originally designed to be usable as an interface to distributed object systems. The request method was envisioned 1309 <h1 id="rfc.section.4"><a href="#rfc.section.4">4.</a> <a id="product.tokens" href="#product.tokens">Product Tokens</a></h1> 1310 <p id="rfc.section.4.p.1">Product tokens are used to allow communicating applications to identify themselves by software name and version. Most fields 1311 using product tokens also allow sub-products which form a significant part of the application to be listed, separated by whitespace. 1312 By convention, the products are listed in order of their significance for identifying the application. 1313 </p> 1314 <div id="rfc.figure.u.16"></div><pre class="inline"><span id="rfc.iref.g.15"></span><span id="rfc.iref.g.16"></span> <a href="#product.tokens" class="smpl">product</a> = <a href="#imported.abnf" class="smpl">token</a> ["/" <a href="#product.tokens" class="smpl">product-version</a>] 1315 <a href="#product.tokens" class="smpl">product-version</a> = <a href="#imported.abnf" class="smpl">token</a> 1316 </pre><p id="rfc.section.4.p.3">Examples:</p> 1317 <div id="rfc.figure.u.17"></div><pre class="text"> User-Agent: CERN-LineMode/2.15 libwww/2.17b3 1318 Server: Apache/0.8.4 1319 </pre><p id="rfc.section.4.p.5">Product tokens <em class="bcp14">SHOULD</em> be short and to the point. They <em class="bcp14">MUST NOT</em> be used for advertising or other non-essential information. Although any token octet <em class="bcp14">MAY</em> appear in a product-version, this token <em class="bcp14">SHOULD</em> only be used for a version identifier (i.e., successive versions of the same product <em class="bcp14">SHOULD</em> only differ in the product-version portion of the product value). 1320 </p> 1321 <h1 id="rfc.section.5"><a href="#rfc.section.5">5.</a> <a id="methods" href="#methods">Request Methods</a></h1> 1322 <h2 id="rfc.section.5.1"><a href="#rfc.section.5.1">5.1</a> <a id="method.overview" href="#method.overview">Overview</a></h2> 1323 <p id="rfc.section.5.1.p.1">The request method token is the primary source of request semantics; it indicates the purpose for which the client has made 1324 this request and what is expected by the client as a successful result. The request semantics <em class="bcp14">MAY</em> be further specialized by the semantics of some header fields when present in a request (<a href="#request.header.fields" title="Request Header Fields">Section 6</a>) if those additional semantics do not conflict with the method. 1325 </p> 1326 <div id="rfc.figure.u.18"></div><pre class="inline"><span id="rfc.iref.g.17"></span> <a href="#method.overview" class="smpl">method</a> = <a href="#imported.abnf" class="smpl">token</a> 1327 </pre><p id="rfc.section.5.1.p.3">HTTP was originally designed to be usable as an interface to distributed object systems. The request method was envisioned 1198 1328 as applying semantics to a target resource in much the same way as invoking a defined method on an identified object would 1199 1329 apply semantics. The method token is case-sensitive because it might be used as a gateway to object-based systems with case-sensitive 1200 1330 method names. 1201 1331 </p> 1202 <p id="rfc.section. 4.1.p.4">Unlike distributed objects, the standardized request methods in HTTP are not resource-specific, since uniform interfaces provide1332 <p id="rfc.section.5.1.p.4">Unlike distributed objects, the standardized request methods in HTTP are not resource-specific, since uniform interfaces provide 1203 1333 for better visibility and reuse in network-based systems <a href="#REST" id="rfc.xref.REST.2"><cite title="Architectural Styles and the Design of Network-based Software Architectures">[REST]</cite></a>. Once defined, a standardized method <em class="bcp14">MUST</em> have the same semantics when applied to any resource, though each resource determines for itself whether those semantics are 1204 1334 implemented or allowed. 1205 1335 </p> 1206 <p id="rfc.section. 4.1.p.5">This specification defines a number of standardized methods that are commonly used in HTTP, as outlined by the following table.1336 <p id="rfc.section.5.1.p.5">This specification defines a number of standardized methods that are commonly used in HTTP, as outlined by the following table. 1207 1337 By convention, standardized methods are defined in all-uppercase ASCII letters. 1208 1338 </p> … … 1221 1351 <td class="left">GET</td> 1222 1352 <td class="left">Transfer a current representation of the target resource.</td> 1223 <td class="left"><a href="#GET" id="rfc.xref.GET.2" title="GET"> 4.3.1</a></td>1353 <td class="left"><a href="#GET" id="rfc.xref.GET.2" title="GET">5.3.1</a></td> 1224 1354 </tr> 1225 1355 <tr> 1226 1356 <td class="left">HEAD</td> 1227 1357 <td class="left">Same as GET, but do not include a message body in the response.</td> 1228 <td class="left"><a href="#HEAD" id="rfc.xref.HEAD.1" title="HEAD"> 4.3.2</a></td>1358 <td class="left"><a href="#HEAD" id="rfc.xref.HEAD.1" title="HEAD">5.3.2</a></td> 1229 1359 </tr> 1230 1360 <tr> 1231 1361 <td class="left">POST</td> 1232 1362 <td class="left">Perform resource-specific processing on the request payload.</td> 1233 <td class="left"><a href="#POST" id="rfc.xref.POST.2" title="POST"> 4.3.3</a></td>1363 <td class="left"><a href="#POST" id="rfc.xref.POST.2" title="POST">5.3.3</a></td> 1234 1364 </tr> 1235 1365 <tr> 1236 1366 <td class="left">PUT</td> 1237 1367 <td class="left">Replace all current representations of the target resource with the request payload.</td> 1238 <td class="left"><a href="#PUT" id="rfc.xref.PUT.2" title="PUT"> 4.3.4</a></td>1368 <td class="left"><a href="#PUT" id="rfc.xref.PUT.2" title="PUT">5.3.4</a></td> 1239 1369 </tr> 1240 1370 <tr> 1241 1371 <td class="left">DELETE</td> 1242 1372 <td class="left">Remove all current representations of the target resource.</td> 1243 <td class="left"><a href="#DELETE" id="rfc.xref.DELETE.1" title="DELETE"> 4.3.5</a></td>1373 <td class="left"><a href="#DELETE" id="rfc.xref.DELETE.1" title="DELETE">5.3.5</a></td> 1244 1374 </tr> 1245 1375 <tr> 1246 1376 <td class="left">CONNECT</td> 1247 1377 <td class="left">Establish a tunnel to the server identified by the target resource.</td> 1248 <td class="left"><a href="#CONNECT" id="rfc.xref.CONNECT.1" title="CONNECT"> 4.3.6</a></td>1378 <td class="left"><a href="#CONNECT" id="rfc.xref.CONNECT.1" title="CONNECT">5.3.6</a></td> 1249 1379 </tr> 1250 1380 <tr> 1251 1381 <td class="left">OPTIONS</td> 1252 1382 <td class="left">Describe the communication options for the target resource.</td> 1253 <td class="left"><a href="#OPTIONS" id="rfc.xref.OPTIONS.1" title="OPTIONS"> 4.3.7</a></td>1383 <td class="left"><a href="#OPTIONS" id="rfc.xref.OPTIONS.1" title="OPTIONS">5.3.7</a></td> 1254 1384 </tr> 1255 1385 <tr> 1256 1386 <td class="left">TRACE</td> 1257 1387 <td class="left">Perform a message loop-back test along the path to the target resource.</td> 1258 <td class="left"><a href="#TRACE" id="rfc.xref.TRACE.1" title="TRACE"> 4.3.8</a></td>1388 <td class="left"><a href="#TRACE" id="rfc.xref.TRACE.1" title="TRACE">5.3.8</a></td> 1259 1389 </tr> 1260 1390 </tbody> 1261 1391 </table> 1262 1392 </div> 1263 <p id="rfc.section. 4.1.p.6">The methods GET and HEAD <em class="bcp14">MUST</em> be supported by all general-purpose servers. All other methods are <em class="bcp14">OPTIONAL</em>. When implemented, a server <em class="bcp14">MUST</em> implement the above methods according to the semantics defined for them in <a href="#method.definitions" title="Method Definitions">Section 4.3</a>.1264 </p> 1265 <p id="rfc.section. 4.1.p.7">Additional methods <em class="bcp14">MAY</em> be used in HTTP; many have already been standardized outside the scope of this specification and registered within the HTTP1393 <p id="rfc.section.5.1.p.6">The methods GET and HEAD <em class="bcp14">MUST</em> be supported by all general-purpose servers. All other methods are <em class="bcp14">OPTIONAL</em>. When implemented, a server <em class="bcp14">MUST</em> implement the above methods according to the semantics defined for them in <a href="#method.definitions" title="Method Definitions">Section 5.3</a>. 1394 </p> 1395 <p id="rfc.section.5.1.p.7">Additional methods <em class="bcp14">MAY</em> be used in HTTP; many have already been standardized outside the scope of this specification and registered within the HTTP 1266 1396 Method Registry maintained by IANA, as defined in <a href="#method.registry" title="Method Registry">Section 9.1</a>. 1267 1397 </p> 1268 <p id="rfc.section. 4.1.p.8">The set of methods allowed by a target resource can be listed in an <a href="#header.allow" class="smpl">Allow</a> header field (<a href="#header.allow" id="rfc.xref.header.allow.1" title="Allow">Section 7.4.1</a>). However, the set of allowed methods can change dynamically. When a request message is received that is unrecognized or1398 <p id="rfc.section.5.1.p.8">The set of methods allowed by a target resource can be listed in an <a href="#header.allow" class="smpl">Allow</a> header field (<a href="#header.allow" id="rfc.xref.header.allow.1" title="Allow">Section 8.4.1</a>). However, the set of allowed methods can change dynamically. When a request message is received that is unrecognized or 1269 1399 not implemented by an origin server, the origin server <em class="bcp14">SHOULD</em> respond with the <a href="#status.501" class="smpl">501 (Not Implemented)</a> status code. When a request message is received that is known by an origin server but not allowed for the target resource, 1270 1400 the origin server <em class="bcp14">SHOULD</em> respond with the <a href="#status.405" class="smpl">405 (Method Not Allowed)</a> status code. 1271 1401 </p> 1272 <h2 id="rfc.section. 4.2"><a href="#rfc.section.4.2">4.2</a> <a id="method.properties" href="#method.properties">Common Method Properties</a></h2>1402 <h2 id="rfc.section.5.2"><a href="#rfc.section.5.2">5.2</a> <a id="method.properties" href="#method.properties">Common Method Properties</a></h2> 1273 1403 <div id="rfc.iref.s.1"></div> 1274 <h3 id="rfc.section. 4.2.1"><a href="#rfc.section.4.2.1">4.2.1</a> <a id="safe.methods" href="#safe.methods">Safe Methods</a></h3>1275 <p id="rfc.section. 4.2.1.p.1">Request methods are considered "<dfn id="safe">safe</dfn>" if their defined semantics are essentially read-only; i.e., the client does not request, and does not expect, any state1404 <h3 id="rfc.section.5.2.1"><a href="#rfc.section.5.2.1">5.2.1</a> <a id="safe.methods" href="#safe.methods">Safe Methods</a></h3> 1405 <p id="rfc.section.5.2.1.p.1">Request methods are considered "<dfn id="safe">safe</dfn>" if their defined semantics are essentially read-only; i.e., the client does not request, and does not expect, any state 1276 1406 change on the origin server as a result of applying a safe method to a target resource. Likewise, reasonable use of a safe 1277 1407 method is not expected to cause any harm, loss of property, or unusual burden on the origin server. 1278 1408 </p> 1279 <p id="rfc.section. 4.2.1.p.2">This definition of safe methods does not prevent an implementation from including behavior that is potentially harmful, not1409 <p id="rfc.section.5.2.1.p.2">This definition of safe methods does not prevent an implementation from including behavior that is potentially harmful, not 1280 1410 entirely read-only, or which causes side-effects while invoking a safe method. What is important, however, is that the client 1281 1411 did not request that additional behavior and cannot be held accountable for it. For example, most servers append request information … … 1284 1414 the Web will often have the side-effect of charging an advertising account. 1285 1415 </p> 1286 <p id="rfc.section. 4.2.1.p.3">The GET, HEAD, OPTIONS, and TRACE request methods are defined to be safe.</p>1287 <p id="rfc.section. 4.2.1.p.4">The purpose of distinguishing between safe and unsafe methods is to allow automated retrieval processes (spiders) and cache1416 <p id="rfc.section.5.2.1.p.3">The GET, HEAD, OPTIONS, and TRACE request methods are defined to be safe.</p> 1417 <p id="rfc.section.5.2.1.p.4">The purpose of distinguishing between safe and unsafe methods is to allow automated retrieval processes (spiders) and cache 1288 1418 performance optimization (pre-fetching) to work without fear of causing harm. In addition, it allows a user agent to apply 1289 1419 appropriate constraints on the automated use of unsafe methods when processing potentially untrusted content. 1290 1420 </p> 1291 <p id="rfc.section. 4.2.1.p.5">A user agent <em class="bcp14">SHOULD</em> distinguish between safe and unsafe methods when presenting potential actions to a user, such that the user can be made aware1421 <p id="rfc.section.5.2.1.p.5">A user agent <em class="bcp14">SHOULD</em> distinguish between safe and unsafe methods when presenting potential actions to a user, such that the user can be made aware 1292 1422 of an unsafe action before it is requested. 1293 1423 </p> 1294 <p id="rfc.section. 4.2.1.p.6">When a resource is constructed such that parameters within the effective request URI have the effect of selecting an action,1424 <p id="rfc.section.5.2.1.p.6">When a resource is constructed such that parameters within the effective request URI have the effect of selecting an action, 1295 1425 it is the resource owner's responsibility to ensure that the action is consistent with the request method semantics. For example, 1296 1426 it is common for Web-based content editing software to use actions within query parameters, such as "page?do=delete". If the … … 1300 1430 </p> 1301 1431 <div id="rfc.iref.i.1"></div> 1302 <h3 id="rfc.section. 4.2.2"><a href="#rfc.section.4.2.2">4.2.2</a> <a id="idempotent.methods" href="#idempotent.methods">Idempotent Methods</a></h3>1303 <p id="rfc.section. 4.2.2.p.1">Request methods are considered "<dfn id="idempotent">idempotent</dfn>" if the intended effect of multiple identical requests is the same as for a single request. PUT, DELETE, and all safe request1432 <h3 id="rfc.section.5.2.2"><a href="#rfc.section.5.2.2">5.2.2</a> <a id="idempotent.methods" href="#idempotent.methods">Idempotent Methods</a></h3> 1433 <p id="rfc.section.5.2.2.p.1">Request methods are considered "<dfn id="idempotent">idempotent</dfn>" if the intended effect of multiple identical requests is the same as for a single request. PUT, DELETE, and all safe request 1304 1434 methods are idempotent. 1305 1435 </p> 1306 <p id="rfc.section. 4.2.2.p.2">Like the definition of safe, the idempotent property only applies to what has been requested by the user; a server is free1436 <p id="rfc.section.5.2.2.p.2">Like the definition of safe, the idempotent property only applies to what has been requested by the user; a server is free 1307 1437 to log each request separately, retain a revision control history, or implement other non-idempotent side-effects for each 1308 1438 idempotent request. 1309 1439 </p> 1310 <p id="rfc.section. 4.2.2.p.3">Idempotent methods are distinguished because the request can be repeated automatically if a communication failure occurs before1440 <p id="rfc.section.5.2.2.p.3">Idempotent methods are distinguished because the request can be repeated automatically if a communication failure occurs before 1311 1441 the client is able to read the server's response. For example, if a client sends a PUT request and the underlying connection 1312 1442 is closed before any response is received, then it can establish a new connection and retry the idempotent request because … … 1314 1444 repeated failures would indicate a problem within the server. 1315 1445 </p> 1316 <div id="rfc.iref.c. 6"></div>1317 <h3 id="rfc.section. 4.2.3"><a href="#rfc.section.4.2.3">4.2.3</a> <a id="cacheable.methods" href="#cacheable.methods">Cacheable Methods</a></h3>1318 <p id="rfc.section. 4.2.3.p.1">Request methods are considered "<dfn id="cacheable">cacheable</dfn>" if it is possible and useful to answer a current client request with a stored response from a prior request. GET and HEAD1446 <div id="rfc.iref.c.7"></div> 1447 <h3 id="rfc.section.5.2.3"><a href="#rfc.section.5.2.3">5.2.3</a> <a id="cacheable.methods" href="#cacheable.methods">Cacheable Methods</a></h3> 1448 <p id="rfc.section.5.2.3.p.1">Request methods are considered "<dfn id="cacheable">cacheable</dfn>" if it is possible and useful to answer a current client request with a stored response from a prior request. GET and HEAD 1319 1449 are defined to be cacheable. In general, safe methods that do not depend on a current or authoritative response are cacheable, 1320 1450 though the overwhelming majority of caches only support GET and HEAD. HTTP requirements for cache behavior and cacheable responses 1321 1451 are defined in <a href="#Part6" id="rfc.xref.Part6.2"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Caching">[Part6]</cite></a>. 1322 1452 </p> 1323 <h2 id="rfc.section. 4.3"><a href="#rfc.section.4.3">4.3</a> <a id="method.definitions" href="#method.definitions">Method Definitions</a></h2>1324 <h3 id="rfc.section. 4.3.1"><a href="#rfc.section.4.3.1">4.3.1</a> <a id="GET" href="#GET">GET</a></h3>1325 <div id="rfc.iref.g. 6"></div>1326 <p id="rfc.section. 4.3.1.p.1">The GET method requests transfer of a current representation of the target resource.</p>1327 <p id="rfc.section. 4.3.1.p.2">If the target resource is a data-producing process, it is the produced data which shall be returned as the representation1453 <h2 id="rfc.section.5.3"><a href="#rfc.section.5.3">5.3</a> <a id="method.definitions" href="#method.definitions">Method Definitions</a></h2> 1454 <h3 id="rfc.section.5.3.1"><a href="#rfc.section.5.3.1">5.3.1</a> <a id="GET" href="#GET">GET</a></h3> 1455 <div id="rfc.iref.g.18"></div> 1456 <p id="rfc.section.5.3.1.p.1">The GET method requests transfer of a current representation of the target resource.</p> 1457 <p id="rfc.section.5.3.1.p.2">If the target resource is a data-producing process, it is the produced data which shall be returned as the representation 1328 1458 in the response and not the source text of the process, unless that text happens to be the output of the process. 1329 1459 </p> 1330 <p id="rfc.section. 4.3.1.p.3">The semantics of the GET method change to a "conditional GET" if the request message includes an <a href="p4-conditional.html#header.if-modified-since" class="smpl">If-Modified-Since</a>, <a href="p4-conditional.html#header.if-unmodified-since" class="smpl">If-Unmodified-Since</a>, <a href="p4-conditional.html#header.if-match" class="smpl">If-Match</a>, <a href="p4-conditional.html#header.if-none-match" class="smpl">If-None-Match</a>, or <a href="p5-range.html#header.if-range" class="smpl">If-Range</a> header field (<a href="#Part4" id="rfc.xref.Part4.1"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Conditional Requests">[Part4]</cite></a>). A conditional GET requests that the representation be transferred only under the circumstances described by the conditional1460 <p id="rfc.section.5.3.1.p.3">The semantics of the GET method change to a "conditional GET" if the request message includes an <a href="p4-conditional.html#header.if-modified-since" class="smpl">If-Modified-Since</a>, <a href="p4-conditional.html#header.if-unmodified-since" class="smpl">If-Unmodified-Since</a>, <a href="p4-conditional.html#header.if-match" class="smpl">If-Match</a>, <a href="p4-conditional.html#header.if-none-match" class="smpl">If-None-Match</a>, or <a href="p5-range.html#header.if-range" class="smpl">If-Range</a> header field (<a href="#Part4" id="rfc.xref.Part4.1"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Conditional Requests">[Part4]</cite></a>). A conditional GET requests that the representation be transferred only under the circumstances described by the conditional 1331 1461 header field(s). The conditional GET request is intended to reduce unnecessary network usage by allowing cached representations 1332 1462 to be refreshed without requiring multiple requests or transferring data already held by the client. 1333 1463 </p> 1334 <p id="rfc.section. 4.3.1.p.4">The semantics of the GET method change to a "partial GET" if the request message includes a <a href="p5-range.html#range.retrieval.requests" class="smpl">Range</a> header field (<a href="#Part5" id="rfc.xref.Part5.2"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Range Requests">[Part5]</cite></a>). A partial GET requests that only part of the representation be transferred, as described in <a href="p5-range.html#header.range" title="Range">Section 5.4</a> of <a href="#Part5" id="rfc.xref.Part5.3"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Range Requests">[Part5]</cite></a>. The partial GET request is intended to reduce unnecessary network usage by allowing partially-retrieved representations1464 <p id="rfc.section.5.3.1.p.4">The semantics of the GET method change to a "partial GET" if the request message includes a <a href="p5-range.html#range.retrieval.requests" class="smpl">Range</a> header field (<a href="#Part5" id="rfc.xref.Part5.2"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Range Requests">[Part5]</cite></a>). A partial GET requests that only part of the representation be transferred, as described in <a href="p5-range.html#header.range" title="Range">Section 5.4</a> of <a href="#Part5" id="rfc.xref.Part5.3"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Range Requests">[Part5]</cite></a>. The partial GET request is intended to reduce unnecessary network usage by allowing partially-retrieved representations 1335 1465 to be completed without transferring data already held by the client. 1336 1466 </p> 1337 <p id="rfc.section. 4.3.1.p.5">A payload within a GET request message has no defined semantics; sending a payload body on a GET request might cause some1467 <p id="rfc.section.5.3.1.p.5">A payload within a GET request message has no defined semantics; sending a payload body on a GET request might cause some 1338 1468 existing implementations to reject the request. 1339 1469 </p> 1340 <p id="rfc.section. 4.3.1.p.6">The response to a GET request is cacheable and <em class="bcp14">MAY</em> be used to satisfy subsequent GET and HEAD requests (see <a href="#Part6" id="rfc.xref.Part6.3"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Caching">[Part6]</cite></a>).1341 </p> 1342 <p id="rfc.section. 4.3.1.p.7">See <a href="#encoding.sensitive.information.in.uris" title="Encoding Sensitive Information in URIs">Section 10.2</a> for security considerations when used for forms.1343 </p> 1344 <h3 id="rfc.section. 4.3.2"><a href="#rfc.section.4.3.2">4.3.2</a> <a id="HEAD" href="#HEAD">HEAD</a></h3>1470 <p id="rfc.section.5.3.1.p.6">The response to a GET request is cacheable and <em class="bcp14">MAY</em> be used to satisfy subsequent GET and HEAD requests (see <a href="#Part6" id="rfc.xref.Part6.3"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Caching">[Part6]</cite></a>). 1471 </p> 1472 <p id="rfc.section.5.3.1.p.7">See <a href="#encoding.sensitive.information.in.uris" title="Encoding Sensitive Information in URIs">Section 10.2</a> for security considerations when used for forms. 1473 </p> 1474 <h3 id="rfc.section.5.3.2"><a href="#rfc.section.5.3.2">5.3.2</a> <a id="HEAD" href="#HEAD">HEAD</a></h3> 1345 1475 <div id="rfc.iref.h.1"></div> 1346 <p id="rfc.section. 4.3.2.p.1">The HEAD method is identical to GET except that the server <em class="bcp14">MUST NOT</em> return a message body in the response. The metadata contained in the HTTP header fields in response to a HEAD request <em class="bcp14">SHOULD</em> be identical to the information sent in response to a GET request. This method can be used for obtaining metadata about the1476 <p id="rfc.section.5.3.2.p.1">The HEAD method is identical to GET except that the server <em class="bcp14">MUST NOT</em> return a message body in the response. The metadata contained in the HTTP header fields in response to a HEAD request <em class="bcp14">SHOULD</em> be identical to the information sent in response to a GET request. This method can be used for obtaining metadata about the 1347 1477 representation implied by the request without transferring the representation data. This method is often used for testing 1348 1478 hypertext links for validity, accessibility, and recent modification. 1349 1479 </p> 1350 <p id="rfc.section. 4.3.2.p.2">The response to a HEAD request is cacheable and <em class="bcp14">MAY</em> be used to satisfy a subsequent HEAD request. It also has potential side effects on previously stored responses to GET; see <a href="p6-cache.html#head.effects" title="Updating Caches with HEAD Responses">Section 5</a> of <a href="#Part6" id="rfc.xref.Part6.4"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Caching">[Part6]</cite></a>.1351 </p> 1352 <p id="rfc.section. 4.3.2.p.3">A payload within a HEAD request message has no defined semantics; sending a payload body on a HEAD request might cause some1480 <p id="rfc.section.5.3.2.p.2">The response to a HEAD request is cacheable and <em class="bcp14">MAY</em> be used to satisfy a subsequent HEAD request. It also has potential side effects on previously stored responses to GET; see <a href="p6-cache.html#head.effects" title="Updating Caches with HEAD Responses">Section 5</a> of <a href="#Part6" id="rfc.xref.Part6.4"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Caching">[Part6]</cite></a>. 1481 </p> 1482 <p id="rfc.section.5.3.2.p.3">A payload within a HEAD request message has no defined semantics; sending a payload body on a HEAD request might cause some 1353 1483 existing implementations to reject the request. 1354 1484 </p> 1355 1485 <div id="rfc.iref.p.2"></div> 1356 <h3 id="rfc.section. 4.3.3"><a href="#rfc.section.4.3.3">4.3.3</a> <a id="POST" href="#POST">POST</a></h3>1357 <p id="rfc.section. 4.3.3.p.1">The POST method requests that the origin server accept the representation enclosed in the request as data to be processed1486 <h3 id="rfc.section.5.3.3"><a href="#rfc.section.5.3.3">5.3.3</a> <a id="POST" href="#POST">POST</a></h3> 1487 <p id="rfc.section.5.3.3.p.1">The POST method requests that the origin server accept the representation enclosed in the request as data to be processed 1358 1488 by the target resource. POST is designed to allow a uniform method to cover the following functions: 1359 1489 </p> … … 1364 1494 <li>Extending a database through an append operation.</li> 1365 1495 </ul> 1366 <p id="rfc.section. 4.3.3.p.2">The actual function performed by the POST method is determined by the server and is usually dependent on the effective request1496 <p id="rfc.section.5.3.3.p.2">The actual function performed by the POST method is determined by the server and is usually dependent on the effective request 1367 1497 URI. 1368 1498 </p> 1369 <p id="rfc.section. 4.3.3.p.3">The action performed by the POST method might not result in a resource that can be identified by a URI. In this case, either <a href="#status.200" class="smpl">200 (OK)</a> or <a href="#status.204" class="smpl">204 (No Content)</a> is the appropriate response status code, depending on whether or not the response includes a representation that describes1499 <p id="rfc.section.5.3.3.p.3">The action performed by the POST method might not result in a resource that can be identified by a URI. In this case, either <a href="#status.200" class="smpl">200 (OK)</a> or <a href="#status.204" class="smpl">204 (No Content)</a> is the appropriate response status code, depending on whether or not the response includes a representation that describes 1370 1500 the result. 1371 1501 </p> 1372 <p id="rfc.section. 4.3.3.p.4">If a resource has been created on the origin server, the response <em class="bcp14">SHOULD</em> be <a href="#status.201" class="smpl">201 (Created)</a> and contain a representation which describes the status of the request and refers to the new resource, and a <a href="#header.location" class="smpl">Location</a> header field (see <a href="#header.location" id="rfc.xref.header.location.1" title="Location">Section 7.1.2</a>).1373 </p> 1374 <p id="rfc.section. 4.3.3.p.5">Responses to POST requests are only cacheable when they include explicit freshness information (see <a href="p6-cache.html#calculating.freshness.lifetime" title="Calculating Freshness Lifetime">Section 4.1.1</a> of <a href="#Part6" id="rfc.xref.Part6.5"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Caching">[Part6]</cite></a>). A cached POST response with a <a href="#header.content-location" class="smpl">Content-Location</a> header field (see <a href="#header.content-location" id="rfc.xref.header.content-location.2" title="Content-Location">Section 3.1.4</a>) whose value is the effective Request URI <em class="bcp14">MAY</em> be used to satisfy subsequent GET and HEAD (not POST) requests.1375 </p> 1376 <p id="rfc.section. 4.3.3.p.6">Note that POST caching is not widely implemented. However, the <a href="#status.303" class="smpl">303 (See Other)</a> response can be used to direct the user agent to retrieve a cacheable representation of the resource.1377 </p> 1378 <h3 id="rfc.section. 4.3.4"><a href="#rfc.section.4.3.4">4.3.4</a> <a id="PUT" href="#PUT">PUT</a></h3>1502 <p id="rfc.section.5.3.3.p.4">If a resource has been created on the origin server, the response <em class="bcp14">SHOULD</em> be <a href="#status.201" class="smpl">201 (Created)</a> and contain a representation which describes the status of the request and refers to the new resource, and a <a href="#header.location" class="smpl">Location</a> header field (see <a href="#header.location" id="rfc.xref.header.location.1" title="Location">Section 8.1.2</a>). 1503 </p> 1504 <p id="rfc.section.5.3.3.p.5">Responses to POST requests are only cacheable when they include explicit freshness information (see <a href="p6-cache.html#calculating.freshness.lifetime" title="Calculating Freshness Lifetime">Section 4.1.1</a> of <a href="#Part6" id="rfc.xref.Part6.5"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Caching">[Part6]</cite></a>). A cached POST response with a <a href="#header.content-location" class="smpl">Content-Location</a> header field (see <a href="#header.content-location" id="rfc.xref.header.content-location.2" title="Content-Location">Section 3.1.4.2</a>) whose value is the effective Request URI <em class="bcp14">MAY</em> be used to satisfy subsequent GET and HEAD (not POST) requests. 1505 </p> 1506 <p id="rfc.section.5.3.3.p.6">Note that POST caching is not widely implemented. However, the <a href="#status.303" class="smpl">303 (See Other)</a> response can be used to direct the user agent to retrieve a cacheable representation of the resource. 1507 </p> 1508 <h3 id="rfc.section.5.3.4"><a href="#rfc.section.5.3.4">5.3.4</a> <a id="PUT" href="#PUT">PUT</a></h3> 1379 1509 <div id="rfc.iref.p.3"></div> 1380 <p id="rfc.section. 4.3.4.p.1">The PUT method requests that the state of the target resource be created or replaced with the state defined by the representation1510 <p id="rfc.section.5.3.4.p.1">The PUT method requests that the state of the target resource be created or replaced with the state defined by the representation 1381 1511 enclosed in the request message payload. A successful PUT of a given representation would suggest that a subsequent GET on 1382 1512 that same target resource will result in an equivalent representation being returned in a <a href="#status.200" class="smpl">200 (OK)</a> response. However, there is no guarantee that such a state change will be observable, since the target resource might be acted … … 1385 1515 by the origin server. 1386 1516 </p> 1387 <p id="rfc.section. 4.3.4.p.2">If the target resource does not have a current representation and the PUT successfully creates one, then the origin server <em class="bcp14">MUST</em> inform the user agent by sending a <a href="#status.201" class="smpl">201 (Created)</a> response. If the target resource does have a current representation and that representation is successfully modified in accordance1517 <p id="rfc.section.5.3.4.p.2">If the target resource does not have a current representation and the PUT successfully creates one, then the origin server <em class="bcp14">MUST</em> inform the user agent by sending a <a href="#status.201" class="smpl">201 (Created)</a> response. If the target resource does have a current representation and that representation is successfully modified in accordance 1388 1518 with the state of the enclosed representation, then either a <a href="#status.200" class="smpl">200 (OK)</a> or <a href="#status.204" class="smpl">204 (No Content)</a> response <em class="bcp14">SHOULD</em> be sent to indicate successful completion of the request. 1389 1519 </p> 1390 <p id="rfc.section. 4.3.4.p.3">Unrecognized header fields <em class="bcp14">SHOULD</em> be ignored (i.e., not saved as part of the resource state).1391 </p> 1392 <p id="rfc.section. 4.3.4.p.4">An origin server <em class="bcp14">SHOULD</em> verify that the PUT representation is consistent with any constraints which the server has for the target resource that cannot1520 <p id="rfc.section.5.3.4.p.3">Unrecognized header fields <em class="bcp14">SHOULD</em> be ignored (i.e., not saved as part of the resource state). 1521 </p> 1522 <p id="rfc.section.5.3.4.p.4">An origin server <em class="bcp14">SHOULD</em> verify that the PUT representation is consistent with any constraints which the server has for the target resource that cannot 1393 1523 or will not be changed by the PUT. This is particularly important when the origin server uses internal configuration information 1394 1524 related to the URI in order to set the values for representation metadata on GET responses. When a PUT representation is inconsistent … … 1396 1526 appropriate error message containing sufficient information to explain why the representation is unsuitable. The <a href="#status.409" class="smpl">409 (Conflict)</a> or <a href="#status.415" class="smpl">415 (Unsupported Media Type)</a> status codes are suggested, with the latter being specific to constraints on <a href="#header.content-type" class="smpl">Content-Type</a> values. 1397 1527 </p> 1398 <p id="rfc.section. 4.3.4.p.5">For example, if the target resource is configured to always have a <a href="#header.content-type" class="smpl">Content-Type</a> of "text/html" and the representation being PUT has a Content-Type of "image/jpeg", then the origin server <em class="bcp14">SHOULD</em> do one of:1528 <p id="rfc.section.5.3.4.p.5">For example, if the target resource is configured to always have a <a href="#header.content-type" class="smpl">Content-Type</a> of "text/html" and the representation being PUT has a Content-Type of "image/jpeg", then the origin server <em class="bcp14">SHOULD</em> do one of: 1399 1529 </p> 1400 1530 <ol class="la"> … … 1407 1537 </li> 1408 1538 </ol> 1409 <p id="rfc.section. 4.3.4.p.6">HTTP does not define exactly how a PUT method affects the state of an origin server beyond what can be expressed by the intent1539 <p id="rfc.section.5.3.4.p.6">HTTP does not define exactly how a PUT method affects the state of an origin server beyond what can be expressed by the intent 1410 1540 of the user agent request and the semantics of the origin server response. It does not define what a resource might be, in 1411 1541 any sense of that word, beyond the interface provided via HTTP. It does not define how resource state is "stored", nor how … … 1414 1544 the server. 1415 1545 </p> 1416 <p id="rfc.section. 4.3.4.p.7">The fundamental difference between the POST and PUT methods is highlighted by the different intent for the target resource.1546 <p id="rfc.section.5.3.4.p.7">The fundamental difference between the POST and PUT methods is highlighted by the different intent for the target resource. 1417 1547 The target resource in a POST request is intended to handle the enclosed representation as a data-accepting process, such 1418 1548 as for a gateway to some other protocol or a document that accepts annotations. In contrast, the target resource in a PUT … … 1420 1550 and visible to intermediaries, even though the exact effect is only known by the origin server. 1421 1551 </p> 1422 <p id="rfc.section. 4.3.4.p.8">Proper interpretation of a PUT request presumes that the user agent knows what target resource is desired. A service that1552 <p id="rfc.section.5.3.4.p.8">Proper interpretation of a PUT request presumes that the user agent knows what target resource is desired. A service that 1423 1553 is intended to select a proper URI on behalf of the client, after receiving a state-changing request, <em class="bcp14">SHOULD</em> be implemented using the POST method rather than PUT. If the origin server will not make the requested PUT state change to 1424 1554 the target resource and instead wishes to have it applied to a different resource, such as when the resource has been moved 1425 1555 to a different URI, then the origin server <em class="bcp14">MUST</em> send a <a href="#status.301" class="smpl">301 (Moved Permanently)</a> response; the user agent <em class="bcp14">MAY</em> then make its own decision regarding whether or not to redirect the request. 1426 1556 </p> 1427 <p id="rfc.section. 4.3.4.p.9">A PUT request applied to the target resource <em class="bcp14">MAY</em> have side-effects on other resources. For example, an article might have a URI for identifying "the current version" (a resource)1557 <p id="rfc.section.5.3.4.p.9">A PUT request applied to the target resource <em class="bcp14">MAY</em> have side-effects on other resources. For example, an article might have a URI for identifying "the current version" (a resource) 1428 1558 which is separate from the URIs identifying each particular version (different resources that at one point shared the same 1429 1559 state as the current version resource). A successful PUT request on "the current version" URI might therefore create a new … … 1431 1561 the related resources. 1432 1562 </p> 1433 <p id="rfc.section. 4.3.4.p.10">An origin server <em class="bcp14">SHOULD</em> reject any PUT request that contains a <a href="p5-range.html#header.content-range" class="smpl">Content-Range</a> header field (<a href="p5-range.html#header.content-range" title="Content-Range">Section 5.2</a> of <a href="#Part5" id="rfc.xref.Part5.4"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Range Requests">[Part5]</cite></a>), since it might be misinterpreted as partial content (or might be partial content that is being mistakenly PUT as a full1563 <p id="rfc.section.5.3.4.p.10">An origin server <em class="bcp14">SHOULD</em> reject any PUT request that contains a <a href="p5-range.html#header.content-range" class="smpl">Content-Range</a> header field (<a href="p5-range.html#header.content-range" title="Content-Range">Section 5.2</a> of <a href="#Part5" id="rfc.xref.Part5.4"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Range Requests">[Part5]</cite></a>), since it might be misinterpreted as partial content (or might be partial content that is being mistakenly PUT as a full 1434 1564 representation). Partial content updates are possible by targeting a separately identified resource with state that overlaps 1435 1565 a portion of the larger resource, or by using a different method that has been specifically defined for partial updates (for 1436 1566 example, the PATCH method defined in <a href="#RFC5789" id="rfc.xref.RFC5789.1"><cite title="PATCH Method for HTTP">[RFC5789]</cite></a>). 1437 1567 </p> 1438 <p id="rfc.section. 4.3.4.p.11">Responses to the PUT method are not cacheable. If a PUT request passes through a cache that has one or more stored responses1568 <p id="rfc.section.5.3.4.p.11">Responses to the PUT method are not cacheable. If a PUT request passes through a cache that has one or more stored responses 1439 1569 for the effective request URI, those stored responses will be invalidated (see <a href="p6-cache.html#invalidation.after.updates.or.deletions" title="Request Methods that Invalidate">Section 6</a> of <a href="#Part6" id="rfc.xref.Part6.6"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Caching">[Part6]</cite></a>). 1440 1570 </p> 1441 <h3 id="rfc.section. 4.3.5"><a href="#rfc.section.4.3.5">4.3.5</a> <a id="DELETE" href="#DELETE">DELETE</a></h3>1442 <div id="rfc.iref.d. 1"></div>1443 <p id="rfc.section. 4.3.5.p.1">The DELETE method requests that the origin server delete the target resource. This method <em class="bcp14">MAY</em> be overridden by human intervention (or other means) on the origin server. The client cannot be guaranteed that the operation1571 <h3 id="rfc.section.5.3.5"><a href="#rfc.section.5.3.5">5.3.5</a> <a id="DELETE" href="#DELETE">DELETE</a></h3> 1572 <div id="rfc.iref.d.2"></div> 1573 <p id="rfc.section.5.3.5.p.1">The DELETE method requests that the origin server delete the target resource. This method <em class="bcp14">MAY</em> be overridden by human intervention (or other means) on the origin server. The client cannot be guaranteed that the operation 1444 1574 has been carried out, even if the status code returned from the origin server indicates that the action has been completed 1445 1575 successfully. However, the server <em class="bcp14">SHOULD NOT</em> indicate success unless, at the time the response is given, it intends to delete the resource or move it to an inaccessible 1446 1576 location. 1447 1577 </p> 1448 <p id="rfc.section. 4.3.5.p.2">A successful response <em class="bcp14">SHOULD</em> be <a href="#status.200" class="smpl">200 (OK)</a> if the response includes a representation describing the status, <a href="#status.202" class="smpl">202 (Accepted)</a> if the action has not yet been enacted, or <a href="#status.204" class="smpl">204 (No Content)</a> if the action has been enacted but the response does not include a representation.1449 </p> 1450 <p id="rfc.section. 4.3.5.p.3">A payload within a DELETE request message has no defined semantics; sending a payload body on a DELETE request might cause1578 <p id="rfc.section.5.3.5.p.2">A successful response <em class="bcp14">SHOULD</em> be <a href="#status.200" class="smpl">200 (OK)</a> if the response includes a representation describing the status, <a href="#status.202" class="smpl">202 (Accepted)</a> if the action has not yet been enacted, or <a href="#status.204" class="smpl">204 (No Content)</a> if the action has been enacted but the response does not include a representation. 1579 </p> 1580 <p id="rfc.section.5.3.5.p.3">A payload within a DELETE request message has no defined semantics; sending a payload body on a DELETE request might cause 1451 1581 some existing implementations to reject the request. 1452 1582 </p> 1453 <p id="rfc.section. 4.3.5.p.4">Responses to the DELETE method are not cacheable. If a DELETE request passes through a cache that has one or more stored responses1583 <p id="rfc.section.5.3.5.p.4">Responses to the DELETE method are not cacheable. If a DELETE request passes through a cache that has one or more stored responses 1454 1584 for the effective request URI, those stored responses will be invalidated (see <a href="p6-cache.html#invalidation.after.updates.or.deletions" title="Request Methods that Invalidate">Section 6</a> of <a href="#Part6" id="rfc.xref.Part6.7"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Caching">[Part6]</cite></a>). 1455 1585 </p> 1456 <div id="rfc.iref.c. 7"></div>1457 <h3 id="rfc.section. 4.3.6"><a href="#rfc.section.4.3.6">4.3.6</a> <a id="CONNECT" href="#CONNECT">CONNECT</a></h3>1458 <p id="rfc.section. 4.3.6.p.1">The CONNECT method requests that the proxy establish a tunnel to the request-target and, if successful, thereafter restrict1586 <div id="rfc.iref.c.8"></div> 1587 <h3 id="rfc.section.5.3.6"><a href="#rfc.section.5.3.6">5.3.6</a> <a id="CONNECT" href="#CONNECT">CONNECT</a></h3> 1588 <p id="rfc.section.5.3.6.p.1">The CONNECT method requests that the proxy establish a tunnel to the request-target and, if successful, thereafter restrict 1459 1589 its behavior to blind forwarding of packets until the connection is closed. 1460 1590 </p> 1461 <p id="rfc.section. 4.3.6.p.2">When using CONNECT, the request-target <em class="bcp14">MUST</em> use the authority form (<a href="p1-messaging.html#request-target" title="Request Target">Section 5.3</a> of <a href="#Part1" id="rfc.xref.Part1.11"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[Part1]</cite></a>); i.e., the request-target consists of only the host name and port number of the tunnel destination, separated by a colon.1591 <p id="rfc.section.5.3.6.p.2">When using CONNECT, the request-target <em class="bcp14">MUST</em> use the authority form (<a href="p1-messaging.html#request-target" title="Request Target">Section 5.3</a> of <a href="#Part1" id="rfc.xref.Part1.14"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[Part1]</cite></a>); i.e., the request-target consists of only the host name and port number of the tunnel destination, separated by a colon. 1462 1592 For example, 1463 1593 </p> 1464 <div id="rfc.figure.u.1 1"></div><pre class="text2">CONNECT server.example.com:80 HTTP/1.11594 <div id="rfc.figure.u.19"></div><pre class="text2">CONNECT server.example.com:80 HTTP/1.1 1465 1595 Host: server.example.com:80 1466 1596 1467 </pre><p id="rfc.section. 4.3.6.p.4">Any <a href="#status.2xx" class="smpl">2xx (Successful)</a> response to a CONNECT request indicates that the proxy has established a connection to the requested host and port, and has1597 </pre><p id="rfc.section.5.3.6.p.4">Any <a href="#status.2xx" class="smpl">2xx (Successful)</a> response to a CONNECT request indicates that the proxy has established a connection to the requested host and port, and has 1468 1598 switched to tunneling the current connection to that server connection. The tunneled data from the server begins immediately 1469 1599 after the blank line that concludes the successful response's header block. 1470 1600 </p> 1471 <p id="rfc.section. 4.3.6.p.5">A server <em class="bcp14">SHOULD NOT</em> send any <a href="p1-messaging.html#header.transfer-encoding" class="smpl">Transfer-Encoding</a> or <a href="p1-messaging.html#header.content-length" class="smpl">Content-Length</a> header fields in a successful response. A client <em class="bcp14">MUST</em> ignore any Content-Length or Transfer-Encoding header fields received in a successful response.1472 </p> 1473 <p id="rfc.section. 4.3.6.p.6">Any response other than a successful response indicates that the tunnel has not yet been formed and that the connection remains1601 <p id="rfc.section.5.3.6.p.5">A server <em class="bcp14">SHOULD NOT</em> send any <a href="p1-messaging.html#header.transfer-encoding" class="smpl">Transfer-Encoding</a> or <a href="p1-messaging.html#header.content-length" class="smpl">Content-Length</a> header fields in a successful response. A client <em class="bcp14">MUST</em> ignore any Content-Length or Transfer-Encoding header fields received in a successful response. 1602 </p> 1603 <p id="rfc.section.5.3.6.p.6">Any response other than a successful response indicates that the tunnel has not yet been formed and that the connection remains 1474 1604 governed by HTTP. 1475 1605 </p> 1476 <p id="rfc.section. 4.3.6.p.7">Proxy authentication might be used to establish the authority to create a tunnel:</p>1477 <div id="rfc.figure.u. 12"></div><pre class="text2">CONNECT server.example.com:80 HTTP/1.11606 <p id="rfc.section.5.3.6.p.7">Proxy authentication might be used to establish the authority to create a tunnel:</p> 1607 <div id="rfc.figure.u.20"></div><pre class="text2">CONNECT server.example.com:80 HTTP/1.1 1478 1608 Host: server.example.com:80 1479 1609 Proxy-Authorization: basic aGVsbG86d29ybGQ= 1480 1610 1481 </pre><p id="rfc.section. 4.3.6.p.9">A payload within a CONNECT request message has no defined semantics; sending a payload body on a CONNECT request might cause1611 </pre><p id="rfc.section.5.3.6.p.9">A payload within a CONNECT request message has no defined semantics; sending a payload body on a CONNECT request might cause 1482 1612 some existing implementations to reject the request. 1483 1613 </p> 1484 <p id="rfc.section. 4.3.6.p.10">Similar to a pipelined HTTP/1.1 request, data to be tunneled from client to server <em class="bcp14">MAY</em> be sent immediately after the request (before a response is received). The usual caveats also apply: data can be discarded1614 <p id="rfc.section.5.3.6.p.10">Similar to a pipelined HTTP/1.1 request, data to be tunneled from client to server <em class="bcp14">MAY</em> be sent immediately after the request (before a response is received). The usual caveats also apply: data can be discarded 1485 1615 if the eventual response is negative, and the connection can be reset with no response if more than one TCP segment is outstanding. 1486 1616 </p> 1487 <p id="rfc.section. 4.3.6.p.11">It might be the case that the proxy itself can only reach the requested origin server through another proxy. In this case,1617 <p id="rfc.section.5.3.6.p.11">It might be the case that the proxy itself can only reach the requested origin server through another proxy. In this case, 1488 1618 the first proxy <em class="bcp14">SHOULD</em> make a CONNECT request of that next proxy, requesting a tunnel to the authority. A proxy <em class="bcp14">MUST NOT</em> respond with any <a href="#status.2xx" class="smpl">2xx</a> status code unless it has either a direct or tunnel connection established to the authority. 1489 1619 </p> 1490 <p id="rfc.section. 4.3.6.p.12">If at any point either one of the peers gets disconnected, any outstanding data that came from that peer will be passed to1620 <p id="rfc.section.5.3.6.p.12">If at any point either one of the peers gets disconnected, any outstanding data that came from that peer will be passed to 1491 1621 the other one, and after that also the other connection will be terminated by the proxy. If there is outstanding data to that 1492 1622 peer undelivered, that data will be discarded. 1493 1623 </p> 1494 <p id="rfc.section. 4.3.6.p.13">An origin server which receives a CONNECT request for itself <em class="bcp14">MAY</em> respond with a <a href="#status.2xx" class="smpl">2xx</a> status code to indicate that a connection is established. However, most origin servers do not implement CONNECT.1495 </p> 1496 <h3 id="rfc.section. 4.3.7"><a href="#rfc.section.4.3.7">4.3.7</a> <a id="OPTIONS" href="#OPTIONS">OPTIONS</a></h3>1624 <p id="rfc.section.5.3.6.p.13">An origin server which receives a CONNECT request for itself <em class="bcp14">MAY</em> respond with a <a href="#status.2xx" class="smpl">2xx</a> status code to indicate that a connection is established. However, most origin servers do not implement CONNECT. 1625 </p> 1626 <h3 id="rfc.section.5.3.7"><a href="#rfc.section.5.3.7">5.3.7</a> <a id="OPTIONS" href="#OPTIONS">OPTIONS</a></h3> 1497 1627 <div id="rfc.iref.o.1"></div> 1498 <p id="rfc.section. 4.3.7.p.1">The OPTIONS method requests information about the communication options available on the request/response chain identified1628 <p id="rfc.section.5.3.7.p.1">The OPTIONS method requests information about the communication options available on the request/response chain identified 1499 1629 by the effective request URI. This method allows a client to determine the options and/or requirements associated with a resource, 1500 1630 or the capabilities of a server, without implying a resource action or initiating a resource retrieval. 1501 1631 </p> 1502 <p id="rfc.section. 4.3.7.p.2">Responses to the OPTIONS method are not cacheable.</p>1503 <p id="rfc.section. 4.3.7.p.3">If the OPTIONS request includes a payload, then the media type <em class="bcp14">MUST</em> be indicated by a <a href="#header.content-type" class="smpl">Content-Type</a> field. Although this specification does not define any use for such a body, future extensions to HTTP might use the OPTIONS1632 <p id="rfc.section.5.3.7.p.2">Responses to the OPTIONS method are not cacheable.</p> 1633 <p id="rfc.section.5.3.7.p.3">If the OPTIONS request includes a payload, then the media type <em class="bcp14">MUST</em> be indicated by a <a href="#header.content-type" class="smpl">Content-Type</a> field. Although this specification does not define any use for such a body, future extensions to HTTP might use the OPTIONS 1504 1634 body to make more detailed queries on the server. 1505 1635 </p> 1506 <p id="rfc.section. 4.3.7.p.4">If the request-target (<a href="p1-messaging.html#request-target" title="Request Target">Section 5.3</a> of <a href="#Part1" id="rfc.xref.Part1.12"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[Part1]</cite></a>) is an asterisk ("*"), the OPTIONS request is intended to apply to the server in general rather than to a specific resource.1636 <p id="rfc.section.5.3.7.p.4">If the request-target (<a href="p1-messaging.html#request-target" title="Request Target">Section 5.3</a> of <a href="#Part1" id="rfc.xref.Part1.15"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[Part1]</cite></a>) is an asterisk ("*"), the OPTIONS request is intended to apply to the server in general rather than to a specific resource. 1507 1637 Since a server's communication options typically depend on the resource, the "*" request is only useful as a "ping" or "no-op" 1508 1638 type of method; it does nothing beyond allowing the client to test the capabilities of the server. For example, this can be 1509 1639 used to test a proxy for HTTP/1.1 conformance (or lack thereof). 1510 1640 </p> 1511 <p id="rfc.section. 4.3.7.p.5">If the request-target is not an asterisk, the OPTIONS request applies only to the options that are available when communicating1641 <p id="rfc.section.5.3.7.p.5">If the request-target is not an asterisk, the OPTIONS request applies only to the options that are available when communicating 1512 1642 with that resource. 1513 1643 </p> 1514 <p id="rfc.section. 4.3.7.p.6">A <a href="#status.200" class="smpl">200 (OK)</a> response <em class="bcp14">SHOULD</em> include any header fields that indicate optional features implemented by the server and applicable to that resource (e.g., <a href="#header.allow" class="smpl">Allow</a>), possibly including extensions not defined by this specification. The response payload, if any, <em class="bcp14">SHOULD</em> also include information about the communication options. The format for such a payload is not defined by this specification,1644 <p id="rfc.section.5.3.7.p.6">A <a href="#status.200" class="smpl">200 (OK)</a> response <em class="bcp14">SHOULD</em> include any header fields that indicate optional features implemented by the server and applicable to that resource (e.g., <a href="#header.allow" class="smpl">Allow</a>), possibly including extensions not defined by this specification. The response payload, if any, <em class="bcp14">SHOULD</em> also include information about the communication options. The format for such a payload is not defined by this specification, 1515 1645 but might be defined by future extensions to HTTP. Content negotiation <em class="bcp14">MAY</em> be used to select the appropriate representation. If no payload body is included, the response <em class="bcp14">MUST</em> include a <a href="p1-messaging.html#header.content-length" class="smpl">Content-Length</a> field with a field-value of "0". 1516 1646 </p> 1517 <p id="rfc.section. 4.3.7.p.7">The <a href="#header.max-forwards" class="smpl">Max-Forwards</a> header field <em class="bcp14">MAY</em> be used to target a specific proxy in the request chain (see <a href="#header.max-forwards" id="rfc.xref.header.max-forwards.1" title="Max-Forwards">Section 5.1.1</a>). If no Max-Forwards field is present in the request, then the forwarded request <em class="bcp14">MUST NOT</em> include a Max-Forwards field.1518 </p> 1519 <h3 id="rfc.section. 4.3.8"><a href="#rfc.section.4.3.8">4.3.8</a> <a id="TRACE" href="#TRACE">TRACE</a></h3>1647 <p id="rfc.section.5.3.7.p.7">The <a href="#header.max-forwards" class="smpl">Max-Forwards</a> header field <em class="bcp14">MAY</em> be used to target a specific proxy in the request chain (see <a href="#header.max-forwards" id="rfc.xref.header.max-forwards.1" title="Max-Forwards">Section 6.1.1</a>). If no Max-Forwards field is present in the request, then the forwarded request <em class="bcp14">MUST NOT</em> include a Max-Forwards field. 1648 </p> 1649 <h3 id="rfc.section.5.3.8"><a href="#rfc.section.5.3.8">5.3.8</a> <a id="TRACE" href="#TRACE">TRACE</a></h3> 1520 1650 <div id="rfc.iref.t.1"></div> 1521 <p id="rfc.section. 4.3.8.p.1">The TRACE method requests a remote, application-level loop-back of the request message. The final recipient of the request <em class="bcp14">SHOULD</em> reflect the message received back to the client as the message body of a <a href="#status.200" class="smpl">200 (OK)</a> response. The final recipient is either the origin server or the first proxy to receive a <a href="#header.max-forwards" class="smpl">Max-Forwards</a> value of zero (0) in the request (see <a href="#header.max-forwards" id="rfc.xref.header.max-forwards.2" title="Max-Forwards">Section 5.1.1</a>). A TRACE request <em class="bcp14">MUST NOT</em> include a message body.1522 </p> 1523 <p id="rfc.section. 4.3.8.p.2">TRACE allows the client to see what is being received at the other end of the request chain and use that data for testing1524 or diagnostic information. The value of the <a href="p1-messaging.html#header.via" class="smpl">Via</a> header field (<a href="p1-messaging.html#header.via" title="Via">Section 5.7</a> of <a href="#Part1" id="rfc.xref.Part1.1 3"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[Part1]</cite></a>) is of particular interest, since it acts as a trace of the request chain. Use of the <a href="#header.max-forwards" class="smpl">Max-Forwards</a> header field allows the client to limit the length of the request chain, which is useful for testing a chain of proxies forwarding1651 <p id="rfc.section.5.3.8.p.1">The TRACE method requests a remote, application-level loop-back of the request message. The final recipient of the request <em class="bcp14">SHOULD</em> reflect the message received back to the client as the message body of a <a href="#status.200" class="smpl">200 (OK)</a> response. The final recipient is either the origin server or the first proxy to receive a <a href="#header.max-forwards" class="smpl">Max-Forwards</a> value of zero (0) in the request (see <a href="#header.max-forwards" id="rfc.xref.header.max-forwards.2" title="Max-Forwards">Section 6.1.1</a>). A TRACE request <em class="bcp14">MUST NOT</em> include a message body. 1652 </p> 1653 <p id="rfc.section.5.3.8.p.2">TRACE allows the client to see what is being received at the other end of the request chain and use that data for testing 1654 or diagnostic information. The value of the <a href="p1-messaging.html#header.via" class="smpl">Via</a> header field (<a href="p1-messaging.html#header.via" title="Via">Section 5.7</a> of <a href="#Part1" id="rfc.xref.Part1.16"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[Part1]</cite></a>) is of particular interest, since it acts as a trace of the request chain. Use of the <a href="#header.max-forwards" class="smpl">Max-Forwards</a> header field allows the client to limit the length of the request chain, which is useful for testing a chain of proxies forwarding 1525 1655 messages in an infinite loop. 1526 1656 </p> 1527 <p id="rfc.section. 4.3.8.p.3">If the request is valid, the response <em class="bcp14">SHOULD</em> have a <a href="#header.content-type" class="smpl">Content-Type</a> of "message/http" (see <a href="p1-messaging.html#internet.media.type.message.http" title="Internet Media Type message/http">Section 7.3.1</a> of <a href="#Part1" id="rfc.xref.Part1.14"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[Part1]</cite></a>) and contain a message body that encloses a copy of the entire request message. Responses to the TRACE method are not cacheable.1528 </p> 1529 <h1 id="rfc.section. 5"><a href="#rfc.section.5">5.</a> <a id="request.header.fields" href="#request.header.fields">Request Header Fields</a></h1>1530 <p id="rfc.section. 5.p.1">A client sends request header fields to provide more information about the request context, make the request conditional based1657 <p id="rfc.section.5.3.8.p.3">If the request is valid, the response <em class="bcp14">SHOULD</em> have a <a href="#header.content-type" class="smpl">Content-Type</a> of "message/http" (see <a href="p1-messaging.html#internet.media.type.message.http" title="Internet Media Type message/http">Section 7.3.1</a> of <a href="#Part1" id="rfc.xref.Part1.17"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[Part1]</cite></a>) and contain a message body that encloses a copy of the entire request message. Responses to the TRACE method are not cacheable. 1658 </p> 1659 <h1 id="rfc.section.6"><a href="#rfc.section.6">6.</a> <a id="request.header.fields" href="#request.header.fields">Request Header Fields</a></h1> 1660 <p id="rfc.section.6.p.1">A client sends request header fields to provide more information about the request context, make the request conditional based 1531 1661 on the target resource state, suggest preferred formats for the response, supply authentication credentials, or modify the 1532 1662 expected request processing. These fields act as request modifiers, similar to the parameters on a programming language method 1533 1663 invocation. 1534 1664 </p> 1535 <h2 id="rfc.section. 5.1"><a href="#rfc.section.5.1">5.1</a> <a id="request.controls" href="#request.controls">Controls</a></h2>1536 <p id="rfc.section. 5.1.p.1">Controls are request header fields that direct specific handling of the request.</p>1665 <h2 id="rfc.section.6.1"><a href="#rfc.section.6.1">6.1</a> <a id="request.controls" href="#request.controls">Controls</a></h2> 1666 <p id="rfc.section.6.1.p.1">Controls are request header fields that direct specific handling of the request.</p> 1537 1667 <div id="rfc.table.u.3"> 1538 1668 <table class="tt full left" cellpadding="3" cellspacing="0"> … … 1546 1676 <tr> 1547 1677 <td class="left">Host</td> 1548 <td class="left"><a href="p1-messaging.html#header.host" title="Host">Section 5.4</a> of <a href="#Part1" id="rfc.xref.Part1.1 5"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[Part1]</cite></a></td>1678 <td class="left"><a href="p1-messaging.html#header.host" title="Host">Section 5.4</a> of <a href="#Part1" id="rfc.xref.Part1.18"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[Part1]</cite></a></td> 1549 1679 </tr> 1550 1680 <tr> 1551 1681 <td class="left">Max-Forwards</td> 1552 <td class="left"><a href="#header.max-forwards" id="rfc.xref.header.max-forwards.3" title="Max-Forwards">Section 5.1.1</a></td>1682 <td class="left"><a href="#header.max-forwards" id="rfc.xref.header.max-forwards.3" title="Max-Forwards">Section 6.1.1</a></td> 1553 1683 </tr> 1554 1684 <tr> 1555 1685 <td class="left">Expect</td> 1556 <td class="left"><a href="#header.expect" id="rfc.xref.header.expect.1" title="Expect">Section 5.1.2</a></td>1686 <td class="left"><a href="#header.expect" id="rfc.xref.header.expect.1" title="Expect">Section 6.1.2</a></td> 1557 1687 </tr> 1558 1688 <tr> … … 1564 1694 </div> 1565 1695 <div id="rfc.iref.m.1"></div> 1566 <h3 id="rfc.section. 5.1.1"><a href="#rfc.section.5.1.1">5.1.1</a> <a id="header.max-forwards" href="#header.max-forwards">Max-Forwards</a></h3>1567 <p id="rfc.section. 5.1.1.p.1">The "Max-Forwards" header field provides a mechanism with the TRACE (<a href="#TRACE" id="rfc.xref.TRACE.2" title="TRACE">Section 4.3.8</a>) and OPTIONS (<a href="#OPTIONS" id="rfc.xref.OPTIONS.2" title="OPTIONS">Section 4.3.7</a>) methods to limit the number of times that the request is forwarded by proxies. This can be useful when the client is attempting1696 <h3 id="rfc.section.6.1.1"><a href="#rfc.section.6.1.1">6.1.1</a> <a id="header.max-forwards" href="#header.max-forwards">Max-Forwards</a></h3> 1697 <p id="rfc.section.6.1.1.p.1">The "Max-Forwards" header field provides a mechanism with the TRACE (<a href="#TRACE" id="rfc.xref.TRACE.2" title="TRACE">Section 5.3.8</a>) and OPTIONS (<a href="#OPTIONS" id="rfc.xref.OPTIONS.2" title="OPTIONS">Section 5.3.7</a>) methods to limit the number of times that the request is forwarded by proxies. This can be useful when the client is attempting 1568 1698 to trace a request which appears to be failing or looping mid-chain. 1569 1699 </p> 1570 <div id="rfc.figure.u. 13"></div><pre class="inline"><span id="rfc.iref.g.7"></span> <a href="#header.max-forwards" class="smpl">Max-Forwards</a> = 1*<a href="#imported.abnf" class="smpl">DIGIT</a>1571 </pre><p id="rfc.section. 5.1.1.p.3">The Max-Forwards value is a decimal integer indicating the remaining number of times this request message can be forwarded.</p>1572 <p id="rfc.section. 5.1.1.p.4">Each recipient of a TRACE or OPTIONS request containing a Max-Forwards header field <em class="bcp14">MUST</em> check and update its value prior to forwarding the request. If the received value is zero (0), the recipient <em class="bcp14">MUST NOT</em> forward the request; instead, it <em class="bcp14">MUST</em> respond as the final recipient. If the received Max-Forwards value is greater than zero, then the forwarded message <em class="bcp14">MUST</em> contain an updated Max-Forwards field with a value decremented by one (1).1573 </p> 1574 <p id="rfc.section. 5.1.1.p.5">The Max-Forwards header field <em class="bcp14">MAY</em> be ignored for all other request methods.1700 <div id="rfc.figure.u.21"></div><pre class="inline"><span id="rfc.iref.g.19"></span> <a href="#header.max-forwards" class="smpl">Max-Forwards</a> = 1*<a href="#imported.abnf" class="smpl">DIGIT</a> 1701 </pre><p id="rfc.section.6.1.1.p.3">The Max-Forwards value is a decimal integer indicating the remaining number of times this request message can be forwarded.</p> 1702 <p id="rfc.section.6.1.1.p.4">Each recipient of a TRACE or OPTIONS request containing a Max-Forwards header field <em class="bcp14">MUST</em> check and update its value prior to forwarding the request. If the received value is zero (0), the recipient <em class="bcp14">MUST NOT</em> forward the request; instead, it <em class="bcp14">MUST</em> respond as the final recipient. If the received Max-Forwards value is greater than zero, then the forwarded message <em class="bcp14">MUST</em> contain an updated Max-Forwards field with a value decremented by one (1). 1703 </p> 1704 <p id="rfc.section.6.1.1.p.5">The Max-Forwards header field <em class="bcp14">MAY</em> be ignored for all other request methods. 1575 1705 </p> 1576 1706 <div id="rfc.iref.e.1"></div> 1577 <h3 id="rfc.section. 5.1.2"><a href="#rfc.section.5.1.2">5.1.2</a> <a id="header.expect" href="#header.expect">Expect</a></h3>1578 <p id="rfc.section. 5.1.2.p.1">The "Expect" header field is used to indicate that particular server behaviors are required by the client.</p>1579 <div id="rfc.figure.u. 14"></div><pre class="inline"><span id="rfc.iref.g.8"></span><span id="rfc.iref.g.9"></span><span id="rfc.iref.g.10"></span><span id="rfc.iref.g.11"></span><span id="rfc.iref.g.12"></span> <a href="#header.expect" class="smpl">Expect</a> = 1#<a href="#header.expect" class="smpl">expectation</a>1707 <h3 id="rfc.section.6.1.2"><a href="#rfc.section.6.1.2">6.1.2</a> <a id="header.expect" href="#header.expect">Expect</a></h3> 1708 <p id="rfc.section.6.1.2.p.1">The "Expect" header field is used to indicate that particular server behaviors are required by the client.</p> 1709 <div id="rfc.figure.u.22"></div><pre class="inline"><span id="rfc.iref.g.20"></span><span id="rfc.iref.g.21"></span><span id="rfc.iref.g.22"></span><span id="rfc.iref.g.23"></span><span id="rfc.iref.g.24"></span> <a href="#header.expect" class="smpl">Expect</a> = 1#<a href="#header.expect" class="smpl">expectation</a> 1580 1710 1581 1711 <a href="#header.expect" class="smpl">expectation</a> = <a href="#header.expect" class="smpl">expect-name</a> [ <a href="#imported.abnf" class="smpl">BWS</a> "=" <a href="#imported.abnf" class="smpl">BWS</a> <a href="#header.expect" class="smpl">expect-value</a> ] … … 1585 1715 <a href="#header.expect" class="smpl">expect-name</a> = <a href="#imported.abnf" class="smpl">token</a> 1586 1716 <a href="#header.expect" class="smpl">expect-value</a> = <a href="#imported.abnf" class="smpl">token</a> / <a href="#imported.abnf" class="smpl">quoted-string</a> 1587 </pre><p id="rfc.section. 5.1.2.p.3">If all received Expect header field(s) are syntactically valid but contain an expectation that the recipient does not understand1717 </pre><p id="rfc.section.6.1.2.p.3">If all received Expect header field(s) are syntactically valid but contain an expectation that the recipient does not understand 1588 1718 or cannot comply with, the recipient <em class="bcp14">MUST</em> respond with a <a href="#status.417" class="smpl">417 (Expectation Failed)</a> status code. A recipient of a syntactically invalid Expectation header field <em class="bcp14">MUST</em> respond with a <a href="#status.4xx" class="smpl">4xx</a> status code other than 417. 1589 1719 </p> 1590 <p id="rfc.section. 5.1.2.p.4">The only expectation defined by this specification is:</p>1591 <p id="rfc.section. 5.1.2.p.5"><span id="rfc.iref.31"></span><span id="rfc.iref.e.2"></span> 100-continue1720 <p id="rfc.section.6.1.2.p.4">The only expectation defined by this specification is:</p> 1721 <p id="rfc.section.6.1.2.p.5"><span id="rfc.iref.45"></span><span id="rfc.iref.e.2"></span> 100-continue 1592 1722 </p> 1593 1723 <ul class="empty"> 1594 1724 <li>The "100-continue" expectation is defined below. It does not support any expect-params.</li> 1595 1725 </ul> 1596 <p id="rfc.section. 5.1.2.p.6">Comparison is case-insensitive for names (expect-name), and case-sensitive for values (expect-value).</p>1597 <p id="rfc.section. 5.1.2.p.7">The Expect mechanism is hop-by-hop: the above requirements apply to any server, including proxies. However, the Expect header1726 <p id="rfc.section.6.1.2.p.6">Comparison is case-insensitive for names (expect-name), and case-sensitive for values (expect-value).</p> 1727 <p id="rfc.section.6.1.2.p.7">The Expect mechanism is hop-by-hop: the above requirements apply to any server, including proxies. However, the Expect header 1598 1728 field itself is end-to-end; it <em class="bcp14">MUST</em> be forwarded if the request is forwarded. 1599 1729 </p> 1600 <p id="rfc.section. 5.1.2.p.8">Many older HTTP/1.0 and HTTP/1.1 applications do not understand the Expect header field.</p>1601 <h4 id="rfc.section. 5.1.2.1"><a href="#rfc.section.5.1.2.1">5.1.2.1</a> <a id="use.of.the.100.status" href="#use.of.the.100.status">Use of the 100 (Continue) Status</a></h4>1602 <p id="rfc.section. 5.1.2.1.p.1">The purpose of the <a href="#status.100" class="smpl">100 (Continue)</a> status code (<a href="#status.100" id="rfc.xref.status.100.1" title="100 Continue">Section 6.2.1</a>) is to allow a client that is sending a request message with a payload to determine if the origin server is willing to accept1730 <p id="rfc.section.6.1.2.p.8">Many older HTTP/1.0 and HTTP/1.1 applications do not understand the Expect header field.</p> 1731 <h4 id="rfc.section.6.1.2.1"><a href="#rfc.section.6.1.2.1">6.1.2.1</a> <a id="use.of.the.100.status" href="#use.of.the.100.status">Use of the 100 (Continue) Status</a></h4> 1732 <p id="rfc.section.6.1.2.1.p.1">The purpose of the <a href="#status.100" class="smpl">100 (Continue)</a> status code (<a href="#status.100" id="rfc.xref.status.100.1" title="100 Continue">Section 7.2.1</a>) is to allow a client that is sending a request message with a payload to determine if the origin server is willing to accept 1603 1733 the request (based on the request header fields) before the client sends the payload body. In some cases, it might either 1604 1734 be inappropriate or highly inefficient for the client to send the payload body if the server will reject the message without 1605 1735 looking at the body. 1606 1736 </p> 1607 <p id="rfc.section. 5.1.2.1.p.2">Requirements for HTTP/1.1 clients: </p>1737 <p id="rfc.section.6.1.2.1.p.2">Requirements for HTTP/1.1 clients: </p> 1608 1738 <ul> 1609 1739 <li>If a client will wait for a <a href="#status.100" class="smpl">100 (Continue)</a> response before sending the payload body, it <em class="bcp14">MUST</em> send an <a href="#header.expect" class="smpl">Expect</a> header field with the "100-continue" expectation. … … 1612 1742 </li> 1613 1743 </ul> 1614 <p id="rfc.section. 5.1.2.1.p.3">Because of the presence of older implementations, the protocol allows ambiguous situations in which a client might send "Expect:1744 <p id="rfc.section.6.1.2.1.p.3">Because of the presence of older implementations, the protocol allows ambiguous situations in which a client might send "Expect: 1615 1745 100-continue" without receiving either a <a href="#status.417" class="smpl">417 (Expectation Failed)</a> or a <a href="#status.100" class="smpl">100 (Continue)</a> status code. Therefore, when a client sends this header field to an origin server (possibly via a proxy) from which it has 1616 1746 never seen a <a href="#status.100" class="smpl">100 (Continue)</a> status code, the client <em class="bcp14">SHOULD NOT</em> wait for an indefinite period before sending the payload body. 1617 1747 </p> 1618 <p id="rfc.section. 5.1.2.1.p.4">Requirements for HTTP/1.1 origin servers: </p>1748 <p id="rfc.section.6.1.2.1.p.4">Requirements for HTTP/1.1 origin servers: </p> 1619 1749 <ul> 1620 1750 <li>Upon receiving a request which includes an <a href="#header.expect" class="smpl">Expect</a> header field with the "100-continue" expectation, an origin server <em class="bcp14">MUST</em> either respond with <a href="#status.100" class="smpl">100 (Continue)</a> status code and continue to read from the input stream, or respond with a final status code. The origin server <em class="bcp14">MUST NOT</em> wait for the payload body before sending the <a href="#status.100" class="smpl">100 (Continue)</a> response. If it responds with a final status code, it <em class="bcp14">MAY</em> close the transport connection or it <em class="bcp14">MAY</em> continue to read and discard the rest of the request. It <em class="bcp14">MUST NOT</em> perform the request method if it returns a final status code. … … 1636 1766 </li> 1637 1767 </ul> 1638 <p id="rfc.section. 5.1.2.1.p.5">Requirements for HTTP/1.1 proxies: </p>1768 <p id="rfc.section.6.1.2.1.p.5">Requirements for HTTP/1.1 proxies: </p> 1639 1769 <ul> 1640 1770 <li>If a proxy receives a request that includes an <a href="#header.expect" class="smpl">Expect</a> header field with the "100-continue" expectation, and the proxy either knows that the next-hop server complies with HTTP/1.1 … … 1645 1775 <li>Proxies <em class="bcp14">SHOULD</em> maintain a record of the HTTP version numbers received from recently-referenced next-hop servers. 1646 1776 </li> 1647 <li>A proxy <em class="bcp14">MUST NOT</em> forward a <a href="#status.100" class="smpl">100 (Continue)</a> response if the request message was received from an HTTP/1.0 (or earlier) client and did not include an <a href="#header.expect" class="smpl">Expect</a> header field with the "100-continue" expectation. This requirement overrides the general rule for forwarding of <a href="#status.1xx" class="smpl">1xx</a> responses (see <a href="#status.100" id="rfc.xref.status.100.2" title="100 Continue">Section 6.2.1</a>).1648 </li> 1649 </ul> 1650 <h2 id="rfc.section. 5.2"><a href="#rfc.section.5.2">5.2</a> <a id="request.conditionals" href="#request.conditionals">Conditionals</a></h2>1651 <p id="rfc.section. 5.2.p.1">Conditionals are request header fields that indicate a precondition to be tested before applying the method semantics to the1777 <li>A proxy <em class="bcp14">MUST NOT</em> forward a <a href="#status.100" class="smpl">100 (Continue)</a> response if the request message was received from an HTTP/1.0 (or earlier) client and did not include an <a href="#header.expect" class="smpl">Expect</a> header field with the "100-continue" expectation. This requirement overrides the general rule for forwarding of <a href="#status.1xx" class="smpl">1xx</a> responses (see <a href="#status.100" id="rfc.xref.status.100.2" title="100 Continue">Section 7.2.1</a>). 1778 </li> 1779 </ul> 1780 <h2 id="rfc.section.6.2"><a href="#rfc.section.6.2">6.2</a> <a id="request.conditionals" href="#request.conditionals">Conditionals</a></h2> 1781 <p id="rfc.section.6.2.p.1">Conditionals are request header fields that indicate a precondition to be tested before applying the method semantics to the 1652 1782 target resource. Each precondition is based on metadata that is expected to change if the selected representation of the target 1653 1783 resource is changed. The HTTP/1.1 conditional request mechanisms are defined in <a href="#Part4" id="rfc.xref.Part4.2"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Conditional Requests">[Part4]</cite></a>. … … 1685 1815 </table> 1686 1816 </div> 1687 <h2 id="rfc.section. 5.3"><a href="#rfc.section.5.3">5.3</a> <a id="request.conneg" href="#request.conneg">Content Negotiation</a></h2>1817 <h2 id="rfc.section.6.3"><a href="#rfc.section.6.3">6.3</a> <a id="request.conneg" href="#request.conneg">Content Negotiation</a></h2> 1688 1818 <div id="rfc.table.u.5"> 1689 1819 <table class="tt full left" cellpadding="3" cellspacing="0"> … … 1697 1827 <tr> 1698 1828 <td class="left">Accept</td> 1699 <td class="left"><a href="#header.accept" id="rfc.xref.header.accept. 2" title="Accept">Section 5.3.2</a></td>1829 <td class="left"><a href="#header.accept" id="rfc.xref.header.accept.3" title="Accept">Section 6.3.2</a></td> 1700 1830 </tr> 1701 1831 <tr> 1702 1832 <td class="left">Accept-Charset</td> 1703 <td class="left"><a href="#header.accept-charset" id="rfc.xref.header.accept-charset.2" title="Accept-Charset">Section 5.3.3</a></td>1833 <td class="left"><a href="#header.accept-charset" id="rfc.xref.header.accept-charset.2" title="Accept-Charset">Section 6.3.3</a></td> 1704 1834 </tr> 1705 1835 <tr> 1706 1836 <td class="left">Accept-Encoding</td> 1707 <td class="left"><a href="#header.accept-encoding" id="rfc.xref.header.accept-encoding. 2" title="Accept-Encoding">Section 5.3.4</a></td>1837 <td class="left"><a href="#header.accept-encoding" id="rfc.xref.header.accept-encoding.3" title="Accept-Encoding">Section 6.3.4</a></td> 1708 1838 </tr> 1709 1839 <tr> 1710 1840 <td class="left">Accept-Language</td> 1711 <td class="left"><a href="#header.accept-language" id="rfc.xref.header.accept-language.2" title="Accept-Language">Section 5.3.5</a></td>1841 <td class="left"><a href="#header.accept-language" id="rfc.xref.header.accept-language.2" title="Accept-Language">Section 6.3.5</a></td> 1712 1842 </tr> 1713 1843 </tbody> 1714 1844 </table> 1715 1845 </div> 1716 <h3 id="rfc.section. 5.3.1"><a href="#rfc.section.5.3.1">5.3.1</a> <a id="quality.values" href="#quality.values">Quality Values</a></h3>1717 <p id="rfc.section. 5.3.1.p.1">Many of the request header fields for proactive content negotiation use a common parameter, named "q" (case-insensitive),1846 <h3 id="rfc.section.6.3.1"><a href="#rfc.section.6.3.1">6.3.1</a> <a id="quality.values" href="#quality.values">Quality Values</a></h3> 1847 <p id="rfc.section.6.3.1.p.1">Many of the request header fields for proactive content negotiation use a common parameter, named "q" (case-insensitive), 1718 1848 to assign a relative "weight" to the preference for that associated kind of content. This weight is referred to as a "quality 1719 1849 value" (or "qvalue") because the same parameter name is often used within server configurations to assign a weight to the 1720 1850 relative quality of the various representations that can be selected for a resource. 1721 1851 </p> 1722 <p id="rfc.section. 5.3.1.p.2">The weight is normalized to a real number in the range 0 through 1, where 0.001 is the least preferred and 1 is the most preferred;1852 <p id="rfc.section.6.3.1.p.2">The weight is normalized to a real number in the range 0 through 1, where 0.001 is the least preferred and 1 is the most preferred; 1723 1853 a value of 0 means "not acceptable". If no "q" parameter is present, the default weight is 1. 1724 1854 </p> 1725 <div id="rfc.figure.u. 15"></div><pre class="inline"><span id="rfc.iref.g.13"></span><span id="rfc.iref.g.14"></span> <a href="#quality.values" class="smpl">weight</a> = <a href="#imported.abnf" class="smpl">OWS</a> ";" <a href="#imported.abnf" class="smpl">OWS</a> "q=" <a href="#quality.values" class="smpl">qvalue</a>1855 <div id="rfc.figure.u.23"></div><pre class="inline"><span id="rfc.iref.g.25"></span><span id="rfc.iref.g.26"></span> <a href="#quality.values" class="smpl">weight</a> = <a href="#imported.abnf" class="smpl">OWS</a> ";" <a href="#imported.abnf" class="smpl">OWS</a> "q=" <a href="#quality.values" class="smpl">qvalue</a> 1726 1856 <a href="#quality.values" class="smpl">qvalue</a> = ( "0" [ "." 0*3<a href="#imported.abnf" class="smpl">DIGIT</a> ] ) 1727 1857 / ( "1" [ "." 0*3("0") ] ) 1728 </pre><p id="rfc.section. 5.3.1.p.4">A sender of qvalue <em class="bcp14">MUST NOT</em> generate more than three digits after the decimal point. User configuration of these values ought to be limited in the same1858 </pre><p id="rfc.section.6.3.1.p.4">A sender of qvalue <em class="bcp14">MUST NOT</em> generate more than three digits after the decimal point. User configuration of these values ought to be limited in the same 1729 1859 fashion. 1730 1860 </p> 1731 1861 <div id="rfc.iref.a.1"></div> 1732 <h3 id="rfc.section. 5.3.2"><a href="#rfc.section.5.3.2">5.3.2</a> <a id="header.accept" href="#header.accept">Accept</a></h3>1733 <p id="rfc.section. 5.3.2.p.1">The "Accept" header field can be used by user agents to specify response media types that are acceptable. Accept header fields1862 <h3 id="rfc.section.6.3.2"><a href="#rfc.section.6.3.2">6.3.2</a> <a id="header.accept" href="#header.accept">Accept</a></h3> 1863 <p id="rfc.section.6.3.2.p.1">The "Accept" header field can be used by user agents to specify response media types that are acceptable. Accept header fields 1734 1864 can be used to indicate that the request is specifically limited to a small set of desired types, as in the case of a request 1735 1865 for an in-line image. 1736 1866 </p> 1737 <div id="rfc.figure.u. 16"></div><pre class="inline"><span id="rfc.iref.g.15"></span><span id="rfc.iref.g.16"></span><span id="rfc.iref.g.17"></span><span id="rfc.iref.g.18"></span> <a href="#header.accept" class="smpl">Accept</a> = #( <a href="#header.accept" class="smpl">media-range</a> [ <a href="#header.accept" class="smpl">accept-params</a> ] )1867 <div id="rfc.figure.u.24"></div><pre class="inline"><span id="rfc.iref.g.27"></span><span id="rfc.iref.g.28"></span><span id="rfc.iref.g.29"></span><span id="rfc.iref.g.30"></span> <a href="#header.accept" class="smpl">Accept</a> = #( <a href="#header.accept" class="smpl">media-range</a> [ <a href="#header.accept" class="smpl">accept-params</a> ] ) 1738 1868 1739 1869 <a href="#header.accept" class="smpl">media-range</a> = ( "*/*" … … 1743 1873 <a href="#header.accept" class="smpl">accept-params</a> = <a href="#quality.values" class="smpl">weight</a> *( <a href="#header.accept" class="smpl">accept-ext</a> ) 1744 1874 <a href="#header.accept" class="smpl">accept-ext</a> = <a href="#imported.abnf" class="smpl">OWS</a> ";" <a href="#imported.abnf" class="smpl">OWS</a> <a href="#imported.abnf" class="smpl">token</a> [ "=" <a href="#imported.abnf" class="smpl">word</a> ] 1745 </pre><p id="rfc.section. 5.3.2.p.3">The asterisk "*" character is used to group media types into ranges, with "*/*" indicating all media types and "type/*" indicating1875 </pre><p id="rfc.section.6.3.2.p.3">The asterisk "*" character is used to group media types into ranges, with "*/*" indicating all media types and "type/*" indicating 1746 1876 all subtypes of that type. The media-range <em class="bcp14">MAY</em> include media type parameters that are applicable to that range. 1747 1877 </p> 1748 <p id="rfc.section. 5.3.2.p.4">Each media-range <em class="bcp14">MAY</em> be followed by one or more accept-params, beginning with the "q" parameter for indicating a relative weight, as defined in <a href="#quality.values" title="Quality Values">Section 5.3.1</a>. The first "q" parameter (if any) separates the media-range parameter(s) from the accept-params.1749 </p> 1750 <div class="note" id="rfc.section. 5.3.2.p.5">1878 <p id="rfc.section.6.3.2.p.4">Each media-range <em class="bcp14">MAY</em> be followed by one or more accept-params, beginning with the "q" parameter for indicating a relative weight, as defined in <a href="#quality.values" title="Quality Values">Section 6.3.1</a>. The first "q" parameter (if any) separates the media-range parameter(s) from the accept-params. 1879 </p> 1880 <div class="note" id="rfc.section.6.3.2.p.5"> 1751 1881 <p> <b>Note:</b> Use of the "q" parameter name to separate media type parameters from Accept extension parameters is due to historical practice. 1752 1882 Although this prevents any media type parameter named "q" from being used with a media range, such an event is believed to … … 1755 1885 </p> 1756 1886 </div> 1757 <p id="rfc.section. 5.3.2.p.6">The example</p>1758 <div id="rfc.figure.u. 17"></div><pre class="text"> Accept: audio/*; q=0.2, audio/basic1759 </pre><p id="rfc.section. 5.3.2.p.8"> <em class="bcp14">SHOULD</em> be interpreted as "I prefer audio/basic, but send me any audio type if it is the best available after an 80% mark-down in1887 <p id="rfc.section.6.3.2.p.6">The example</p> 1888 <div id="rfc.figure.u.25"></div><pre class="text"> Accept: audio/*; q=0.2, audio/basic 1889 </pre><p id="rfc.section.6.3.2.p.8"> <em class="bcp14">SHOULD</em> be interpreted as "I prefer audio/basic, but send me any audio type if it is the best available after an 80% mark-down in 1760 1890 quality". 1761 1891 </p> 1762 <p id="rfc.section. 5.3.2.p.9">A request without any Accept header field implies that the user agent will accept any media type in response. If an Accept1892 <p id="rfc.section.6.3.2.p.9">A request without any Accept header field implies that the user agent will accept any media type in response. If an Accept 1763 1893 header field is present in a request and none of the available representations for the response have a media type that is 1764 1894 listed as acceptable, the origin server <em class="bcp14">MAY</em> either honor the Accept header field by sending a <a href="#status.406" class="smpl">406 (Not Acceptable)</a> response or disregard the Accept header field by treating the response as if it is not subject to content negotiation. 1765 1895 </p> 1766 <p id="rfc.section. 5.3.2.p.10">A more elaborate example is</p>1767 <div id="rfc.figure.u. 18"></div><pre class="text"> Accept: text/plain; q=0.5, text/html,1896 <p id="rfc.section.6.3.2.p.10">A more elaborate example is</p> 1897 <div id="rfc.figure.u.26"></div><pre class="text"> Accept: text/plain; q=0.5, text/html, 1768 1898 text/x-dvi; q=0.8, text/x-c 1769 </pre><p id="rfc.section. 5.3.2.p.12">Verbally, this would be interpreted as "text/html and text/x-c are the preferred media types, but if they do not exist, then1899 </pre><p id="rfc.section.6.3.2.p.12">Verbally, this would be interpreted as "text/html and text/x-c are the preferred media types, but if they do not exist, then 1770 1900 send the text/x-dvi representation, and if that does not exist, send the text/plain representation". 1771 1901 </p> 1772 <p id="rfc.section. 5.3.2.p.13">Media ranges can be overridden by more specific media ranges or specific media types. If more than one media range applies1902 <p id="rfc.section.6.3.2.p.13">Media ranges can be overridden by more specific media ranges or specific media types. If more than one media range applies 1773 1903 to a given type, the most specific reference has precedence. For example, 1774 1904 </p> 1775 <div id="rfc.figure.u. 19"></div><pre class="text"> Accept: text/*, text/plain, text/plain;format=flowed, */*1776 </pre><p id="rfc.section. 5.3.2.p.15">have the following precedence: </p>1905 <div id="rfc.figure.u.27"></div><pre class="text"> Accept: text/*, text/plain, text/plain;format=flowed, */* 1906 </pre><p id="rfc.section.6.3.2.p.15">have the following precedence: </p> 1777 1907 <ol> 1778 1908 <li>text/plain;format=flowed</li> … … 1781 1911 <li>*/*</li> 1782 1912 </ol> 1783 <p id="rfc.section. 5.3.2.p.16">The media type quality factor associated with a given type is determined by finding the media range with the highest precedence1913 <p id="rfc.section.6.3.2.p.16">The media type quality factor associated with a given type is determined by finding the media range with the highest precedence 1784 1914 which matches that type. For example, 1785 1915 </p> 1786 <div id="rfc.figure.u.2 0"></div><pre class="text"> Accept: text/*;q=0.3, text/html;q=0.7, text/html;level=1,1916 <div id="rfc.figure.u.28"></div><pre class="text"> Accept: text/*;q=0.3, text/html;q=0.7, text/html;level=1, 1787 1917 text/html;level=2;q=0.4, */*;q=0.5 1788 </pre><p id="rfc.section. 5.3.2.p.18">would cause the following values to be associated:</p>1918 </pre><p id="rfc.section.6.3.2.p.18">would cause the following values to be associated:</p> 1789 1919 <div id="rfc.table.u.6"> 1790 1920 <table class="tt full left" cellpadding="3" cellspacing="0"> … … 1823 1953 </table> 1824 1954 </div> 1825 <p id="rfc.section. 5.3.2.p.19"> <b>Note:</b> A user agent might be provided with a default set of quality values for certain media ranges. However, unless the user agent1955 <p id="rfc.section.6.3.2.p.19"> <b>Note:</b> A user agent might be provided with a default set of quality values for certain media ranges. However, unless the user agent 1826 1956 is a closed system which cannot interact with other rendering agents, this default set ought to be configurable by the user. 1827 1957 </p> 1828 1958 <div id="rfc.iref.a.2"></div> 1829 <h3 id="rfc.section. 5.3.3"><a href="#rfc.section.5.3.3">5.3.3</a> <a id="header.accept-charset" href="#header.accept-charset">Accept-Charset</a></h3>1830 <p id="rfc.section. 5.3.3.p.1">The "Accept-Charset" header field can be used by user agents to indicate what character encodings are acceptable in a response1959 <h3 id="rfc.section.6.3.3"><a href="#rfc.section.6.3.3">6.3.3</a> <a id="header.accept-charset" href="#header.accept-charset">Accept-Charset</a></h3> 1960 <p id="rfc.section.6.3.3.p.1">The "Accept-Charset" header field can be used by user agents to indicate what character encodings are acceptable in a response 1831 1961 payload. This field allows clients capable of understanding more comprehensive or special-purpose character encodings to signal 1832 1962 that capability to a server which is capable of representing documents in those character encodings. 1833 1963 </p> 1834 <div id="rfc.figure.u.2 1"></div><pre class="inline"><span id="rfc.iref.g.19"></span> <a href="#header.accept-charset" class="smpl">Accept-Charset</a> = 1#( ( <a href="#rule.charset" class="smpl">charset</a> / "*" ) [ <a href="#quality.values" class="smpl">weight</a> ] )1835 </pre><p id="rfc.section. 5.3.3.p.3">Character encoding values (a.k.a., charsets) are described in <a href="#character.sets" title="Character Encodings (charset)">Section 8.3</a>. Each charset <em class="bcp14">MAY</em> be given an associated quality value which represents the user's preference for that charset, as defined in <a href="#quality.values" title="Quality Values">Section 5.3.1</a>. An example is1836 </p> 1837 <div id="rfc.figure.u. 22"></div><pre class="text"> Accept-Charset: iso-8859-5, unicode-1-1;q=0.81838 </pre><p id="rfc.section. 5.3.3.p.5">The special value "*", if present in the Accept-Charset field, matches every character encoding which is not mentioned elsewhere1964 <div id="rfc.figure.u.29"></div><pre class="inline"><span id="rfc.iref.g.31"></span> <a href="#header.accept-charset" class="smpl">Accept-Charset</a> = 1#( ( <a href="#rule.charset" class="smpl">charset</a> / "*" ) [ <a href="#quality.values" class="smpl">weight</a> ] ) 1965 </pre><p id="rfc.section.6.3.3.p.3">Character encoding values (a.k.a., charsets) are described in <a href="#character.sets" title="Character Encodings (charset)">Section 3.1.1.2</a>. Each charset <em class="bcp14">MAY</em> be given an associated quality value which represents the user's preference for that charset, as defined in <a href="#quality.values" title="Quality Values">Section 6.3.1</a>. An example is 1966 </p> 1967 <div id="rfc.figure.u.30"></div><pre class="text"> Accept-Charset: iso-8859-5, unicode-1-1;q=0.8 1968 </pre><p id="rfc.section.6.3.3.p.5">The special value "*", if present in the Accept-Charset field, matches every character encoding which is not mentioned elsewhere 1839 1969 in the Accept-Charset field. If no "*" is present in an Accept-Charset field, then any character encodings not explicitly 1840 1970 mentioned in the field are considered "not acceptable" to the client. 1841 1971 </p> 1842 <p id="rfc.section. 5.3.3.p.6">A request without any Accept-Charset header field implies that the user agent will accept any character encoding in response.</p>1843 <p id="rfc.section. 5.3.3.p.7">If an Accept-Charset header field is present in a request and none of the available representations for the response have1972 <p id="rfc.section.6.3.3.p.6">A request without any Accept-Charset header field implies that the user agent will accept any character encoding in response.</p> 1973 <p id="rfc.section.6.3.3.p.7">If an Accept-Charset header field is present in a request and none of the available representations for the response have 1844 1974 a character encoding that is listed as acceptable, the origin server <em class="bcp14">MAY</em> either honor the Accept-Charset header field by sending a <a href="#status.406" class="smpl">406 (Not Acceptable)</a> response or disregard the Accept-Charset header field by treating the response as if it is not subject to content negotiation. 1845 1975 </p> 1846 1976 <div id="rfc.iref.a.3"></div> 1847 <h3 id="rfc.section. 5.3.4"><a href="#rfc.section.5.3.4">5.3.4</a> <a id="header.accept-encoding" href="#header.accept-encoding">Accept-Encoding</a></h3>1848 <p id="rfc.section. 5.3.4.p.1">The "Accept-Encoding" header field can be used by user agents to indicate what response content-codings (<a href="#content.codings" title="Content Codings">Section 8.4</a>) are acceptable in the response. An "identity" token is used as a synonym for "no encoding" in order to communicate when1977 <h3 id="rfc.section.6.3.4"><a href="#rfc.section.6.3.4">6.3.4</a> <a id="header.accept-encoding" href="#header.accept-encoding">Accept-Encoding</a></h3> 1978 <p id="rfc.section.6.3.4.p.1">The "Accept-Encoding" header field can be used by user agents to indicate what response content-codings (<a href="#content.codings" title="Content Codings">Section 3.1.2.1</a>) are acceptable in the response. An "identity" token is used as a synonym for "no encoding" in order to communicate when 1849 1979 no encoding is preferred. 1850 1980 </p> 1851 <div id="rfc.figure.u. 23"></div><pre class="inline"><span id="rfc.iref.g.20"></span><span id="rfc.iref.g.21"></span> <a href="#header.accept-encoding" class="smpl">Accept-Encoding</a> = #( <a href="#header.accept-encoding" class="smpl">codings</a> [ <a href="#quality.values" class="smpl">weight</a> ] )1981 <div id="rfc.figure.u.31"></div><pre class="inline"><span id="rfc.iref.g.32"></span><span id="rfc.iref.g.33"></span> <a href="#header.accept-encoding" class="smpl">Accept-Encoding</a> = #( <a href="#header.accept-encoding" class="smpl">codings</a> [ <a href="#quality.values" class="smpl">weight</a> ] ) 1852 1982 <a href="#header.accept-encoding" class="smpl">codings</a> = <a href="#content.codings" class="smpl">content-coding</a> / "identity" / "*" 1853 </pre><p id="rfc.section. 5.3.4.p.3">Each codings value <em class="bcp14">MAY</em> be given an associated quality value which represents the preference for that encoding, as defined in <a href="#quality.values" title="Quality Values">Section 5.3.1</a>.1854 </p> 1855 <p id="rfc.section. 5.3.4.p.4">For example,</p>1856 <div id="rfc.figure.u. 24"></div><pre class="text"> Accept-Encoding: compress, gzip1983 </pre><p id="rfc.section.6.3.4.p.3">Each codings value <em class="bcp14">MAY</em> be given an associated quality value which represents the preference for that encoding, as defined in <a href="#quality.values" title="Quality Values">Section 6.3.1</a>. 1984 </p> 1985 <p id="rfc.section.6.3.4.p.4">For example,</p> 1986 <div id="rfc.figure.u.32"></div><pre class="text"> Accept-Encoding: compress, gzip 1857 1987 Accept-Encoding: 1858 1988 Accept-Encoding: * 1859 1989 Accept-Encoding: compress;q=0.5, gzip;q=1.0 1860 1990 Accept-Encoding: gzip;q=1.0, identity; q=0.5, *;q=0 1861 </pre><p id="rfc.section. 5.3.4.p.6">A server tests whether a content-coding for a given representation is acceptable, according to an Accept-Encoding field, using1991 </pre><p id="rfc.section.6.3.4.p.6">A server tests whether a content-coding for a given representation is acceptable, according to an Accept-Encoding field, using 1862 1992 these rules: 1863 1993 </p> … … 1870 2000 </li> 1871 2001 <li>If the representation's content-coding is one of the content-codings listed in the Accept-Encoding field, then it is acceptable 1872 unless it is accompanied by a qvalue of 0. (As defined in <a href="#quality.values" title="Quality Values">Section 5.3.1</a>, a qvalue of 0 means "not acceptable".)2002 unless it is accompanied by a qvalue of 0. (As defined in <a href="#quality.values" title="Quality Values">Section 6.3.1</a>, a qvalue of 0 means "not acceptable".) 1873 2003 </li> 1874 2004 <li>If multiple content-codings are acceptable, then the acceptable content-coding with the highest non-zero qvalue is preferred.</li> 1875 2005 </ol> 1876 <p id="rfc.section. 5.3.4.p.7">An Accept-Encoding header field with a combined field-value that is empty implies that the user agent does not want any content-coding2006 <p id="rfc.section.6.3.4.p.7">An Accept-Encoding header field with a combined field-value that is empty implies that the user agent does not want any content-coding 1877 2007 in response. If an Accept-Encoding header field is present in a request and none of the available representations for the 1878 2008 response have a content-coding that is listed as acceptable, the origin server <em class="bcp14">SHOULD</em> send a response without any content-coding. 1879 2009 </p> 1880 <p id="rfc.section. 5.3.4.p.8">A request without an Accept-Encoding header field implies that the user agent will accept any content-coding in response.</p>1881 <div class="note" id="rfc.section. 5.3.4.p.9">2010 <p id="rfc.section.6.3.4.p.8">A request without an Accept-Encoding header field implies that the user agent will accept any content-coding in response.</p> 2011 <div class="note" id="rfc.section.6.3.4.p.9"> 1882 2012 <p> <b>Note:</b> Most HTTP/1.0 applications do not recognize or obey qvalues associated with content-codings. This means that qvalues will 1883 2013 not work and are not permitted with x-gzip or x-compress. … … 1885 2015 </div> 1886 2016 <div id="rfc.iref.a.4"></div> 1887 <h3 id="rfc.section. 5.3.5"><a href="#rfc.section.5.3.5">5.3.5</a> <a id="header.accept-language" href="#header.accept-language">Accept-Language</a></h3>1888 <p id="rfc.section. 5.3.5.p.1">The "Accept-Language" header field can be used by user agents to indicate the set of natural languages that are preferred1889 in the response. Language tags are defined in <a href="#language.tags" title="Language Tags">Section 8.6</a>.1890 </p> 1891 <div id="rfc.figure.u. 25"></div><pre class="inline"><span id="rfc.iref.g.22"></span><span id="rfc.iref.g.23"></span> <a href="#header.accept-language" class="smpl">Accept-Language</a> = 1#( <a href="#header.accept-language" class="smpl">language-range</a> [ <a href="#quality.values" class="smpl">weight</a> ] )2017 <h3 id="rfc.section.6.3.5"><a href="#rfc.section.6.3.5">6.3.5</a> <a id="header.accept-language" href="#header.accept-language">Accept-Language</a></h3> 2018 <p id="rfc.section.6.3.5.p.1">The "Accept-Language" header field can be used by user agents to indicate the set of natural languages that are preferred 2019 in the response. Language tags are defined in <a href="#language.tags" title="Language Tags">Section 3.1.3.1</a>. 2020 </p> 2021 <div id="rfc.figure.u.33"></div><pre class="inline"><span id="rfc.iref.g.34"></span><span id="rfc.iref.g.35"></span> <a href="#header.accept-language" class="smpl">Accept-Language</a> = 1#( <a href="#header.accept-language" class="smpl">language-range</a> [ <a href="#quality.values" class="smpl">weight</a> ] ) 1892 2022 <a href="#header.accept-language" class="smpl">language-range</a> = 1893 2023 <language-range, defined in <a href="#RFC4647" id="rfc.xref.RFC4647.1"><cite title="Matching of Language Tags">[RFC4647]</cite></a>, <a href="http://tools.ietf.org/html/rfc4647#section-2.1">Section 2.1</a>> 1894 </pre><p id="rfc.section. 5.3.5.p.3">Each language-range can be given an associated quality value which represents an estimate of the user's preference for the1895 languages specified by that range, as defined in <a href="#quality.values" title="Quality Values">Section 5.3.1</a>. For example,1896 </p> 1897 <div id="rfc.figure.u. 26"></div><pre class="text"> Accept-Language: da, en-gb;q=0.8, en;q=0.71898 </pre><p id="rfc.section. 5.3.5.p.5">would mean: "I prefer Danish, but will accept British English and other types of English". (see also <a href="http://tools.ietf.org/html/rfc4647#section-2.3">Section 2.3</a> of <a href="#RFC4647" id="rfc.xref.RFC4647.2"><cite title="Matching of Language Tags">[RFC4647]</cite></a>)1899 </p> 1900 <p id="rfc.section. 5.3.5.p.6">For matching, <a href="http://tools.ietf.org/html/rfc4647#section-3">Section 3</a> of <a href="#RFC4647" id="rfc.xref.RFC4647.3"><cite title="Matching of Language Tags">[RFC4647]</cite></a> defines several matching schemes. Implementations can offer the most appropriate matching scheme for their requirements.1901 </p> 1902 <div class="note" id="rfc.section. 5.3.5.p.7">2024 </pre><p id="rfc.section.6.3.5.p.3">Each language-range can be given an associated quality value which represents an estimate of the user's preference for the 2025 languages specified by that range, as defined in <a href="#quality.values" title="Quality Values">Section 6.3.1</a>. For example, 2026 </p> 2027 <div id="rfc.figure.u.34"></div><pre class="text"> Accept-Language: da, en-gb;q=0.8, en;q=0.7 2028 </pre><p id="rfc.section.6.3.5.p.5">would mean: "I prefer Danish, but will accept British English and other types of English". (see also <a href="http://tools.ietf.org/html/rfc4647#section-2.3">Section 2.3</a> of <a href="#RFC4647" id="rfc.xref.RFC4647.2"><cite title="Matching of Language Tags">[RFC4647]</cite></a>) 2029 </p> 2030 <p id="rfc.section.6.3.5.p.6">For matching, <a href="http://tools.ietf.org/html/rfc4647#section-3">Section 3</a> of <a href="#RFC4647" id="rfc.xref.RFC4647.3"><cite title="Matching of Language Tags">[RFC4647]</cite></a> defines several matching schemes. Implementations can offer the most appropriate matching scheme for their requirements. 2031 </p> 2032 <div class="note" id="rfc.section.6.3.5.p.7"> 1903 2033 <p> <b>Note:</b> The "Basic Filtering" scheme (<a href="#RFC4647" id="rfc.xref.RFC4647.4"><cite title="Matching of Language Tags">[RFC4647]</cite></a>, <a href="http://tools.ietf.org/html/rfc4647#section-3.3.1">Section 3.3.1</a>) is identical to the matching scheme that was previously defined in <a href="http://tools.ietf.org/html/rfc2616#section-14.4">Section 14.4</a> of <a href="#RFC2616" id="rfc.xref.RFC2616.1"><cite title="Hypertext Transfer Protocol -- HTTP/1.1">[RFC2616]</cite></a>. 1904 2034 </p> 1905 2035 </div> 1906 <p id="rfc.section. 5.3.5.p.8">It might be contrary to the privacy expectations of the user to send an Accept-Language header field with the complete linguistic2036 <p id="rfc.section.6.3.5.p.8">It might be contrary to the privacy expectations of the user to send an Accept-Language header field with the complete linguistic 1907 2037 preferences of the user in every request. For a discussion of this issue, see <a href="#privacy.issues.connected.to.accept.header.fields" title="Privacy Issues Connected to Accept Header Fields">Section 10.5</a>. 1908 2038 </p> 1909 <p id="rfc.section. 5.3.5.p.9">As intelligibility is highly dependent on the individual user, it is recommended that client applications make the choice2039 <p id="rfc.section.6.3.5.p.9">As intelligibility is highly dependent on the individual user, it is recommended that client applications make the choice 1910 2040 of linguistic preference available to the user. If the choice is not made available, then the Accept-Language header field <em class="bcp14">MUST NOT</em> be given in the request. 1911 2041 </p> 1912 <div class="note" id="rfc.section. 5.3.5.p.10">2042 <div class="note" id="rfc.section.6.3.5.p.10"> 1913 2043 <p> <b>Note:</b> When making the choice of linguistic preference available to the user, we remind implementers of the fact that users are not 1914 2044 familiar with the details of language matching as described above, and ought to be provided appropriate guidance. As an example, … … 1917 2047 </p> 1918 2048 </div> 1919 <h2 id="rfc.section. 5.4"><a href="#rfc.section.5.4">5.4</a> <a id="request.auth" href="#request.auth">Authentication</a></h2>2049 <h2 id="rfc.section.6.4"><a href="#rfc.section.6.4">6.4</a> <a id="request.auth" href="#request.auth">Authentication Credentials</a></h2> 1920 2050 <div id="rfc.table.u.7"> 1921 2051 <table class="tt full left" cellpadding="3" cellspacing="0"> … … 1938 2068 </table> 1939 2069 </div> 1940 <h2 id="rfc.section. 5.5"><a href="#rfc.section.5.5">5.5</a> <a id="request.context" href="#request.context">Context</a></h2>2070 <h2 id="rfc.section.6.5"><a href="#rfc.section.6.5">6.5</a> <a id="request.context" href="#request.context">Context</a></h2> 1941 2071 <div id="rfc.table.u.8"> 1942 2072 <table class="tt full left" cellpadding="3" cellspacing="0"> … … 1950 2080 <tr> 1951 2081 <td class="left">From</td> 1952 <td class="left"><a href="#header.from" id="rfc.xref.header.from.1" title="From">Section 5.5.1</a></td>2082 <td class="left"><a href="#header.from" id="rfc.xref.header.from.1" title="From">Section 6.5.1</a></td> 1953 2083 </tr> 1954 2084 <tr> 1955 2085 <td class="left">Referer</td> 1956 <td class="left"><a href="#header.referer" id="rfc.xref.header.referer.1" title="Referer">Section 5.5.2</a></td>2086 <td class="left"><a href="#header.referer" id="rfc.xref.header.referer.1" title="Referer">Section 6.5.2</a></td> 1957 2087 </tr> 1958 2088 <tr> 1959 2089 <td class="left">TE</td> 1960 <td class="left"><a href="p1-messaging.html#header.te" title="TE">Section 4.3</a> of <a href="#Part1" id="rfc.xref.Part1.1 6"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[Part1]</cite></a></td>2090 <td class="left"><a href="p1-messaging.html#header.te" title="TE">Section 4.3</a> of <a href="#Part1" id="rfc.xref.Part1.19"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[Part1]</cite></a></td> 1961 2091 </tr> 1962 2092 <tr> 1963 2093 <td class="left">User-Agent</td> 1964 <td class="left"><a href="#header.user-agent" id="rfc.xref.header.user-agent.2" title="User-Agent">Section 5.5.3</a></td>2094 <td class="left"><a href="#header.user-agent" id="rfc.xref.header.user-agent.2" title="User-Agent">Section 6.5.3</a></td> 1965 2095 </tr> 1966 2096 </tbody> … … 1968 2098 </div> 1969 2099 <div id="rfc.iref.f.1"></div> 1970 <h3 id="rfc.section. 5.5.1"><a href="#rfc.section.5.5.1">5.5.1</a> <a id="header.from" href="#header.from">From</a></h3>1971 <p id="rfc.section. 5.5.1.p.1">The "From" header field, if given, <em class="bcp14">SHOULD</em> contain an Internet e-mail address for the human user who controls the requesting user agent. The address <em class="bcp14">SHOULD</em> be machine-usable, as defined by "mailbox" in <a href="http://tools.ietf.org/html/rfc5322#section-3.4">Section 3.4</a> of <a href="#RFC5322" id="rfc.xref.RFC5322.1"><cite title="Internet Message Format">[RFC5322]</cite></a>:1972 </p> 1973 <div id="rfc.figure.u. 27"></div><pre class="inline"><span id="rfc.iref.g.24"></span> <a href="#header.from" class="smpl">From</a> = <a href="#header.from" class="smpl">mailbox</a>2100 <h3 id="rfc.section.6.5.1"><a href="#rfc.section.6.5.1">6.5.1</a> <a id="header.from" href="#header.from">From</a></h3> 2101 <p id="rfc.section.6.5.1.p.1">The "From" header field, if given, <em class="bcp14">SHOULD</em> contain an Internet e-mail address for the human user who controls the requesting user agent. The address <em class="bcp14">SHOULD</em> be machine-usable, as defined by "mailbox" in <a href="http://tools.ietf.org/html/rfc5322#section-3.4">Section 3.4</a> of <a href="#RFC5322" id="rfc.xref.RFC5322.1"><cite title="Internet Message Format">[RFC5322]</cite></a>: 2102 </p> 2103 <div id="rfc.figure.u.35"></div><pre class="inline"><span id="rfc.iref.g.36"></span> <a href="#header.from" class="smpl">From</a> = <a href="#header.from" class="smpl">mailbox</a> 1974 2104 1975 2105 <a href="#header.from" class="smpl">mailbox</a> = <mailbox, defined in <a href="#RFC5322" id="rfc.xref.RFC5322.2"><cite title="Internet Message Format">[RFC5322]</cite></a>, <a href="http://tools.ietf.org/html/rfc5322#section-3.4">Section 3.4</a>> 1976 </pre><p id="rfc.section. 5.5.1.p.3">An example is:</p>1977 <div id="rfc.figure.u. 28"></div><pre class="text"> From: webmaster@example.org1978 </pre><p id="rfc.section. 5.5.1.p.5">This header field <em class="bcp14">MAY</em> be used for logging purposes and as a means for identifying the source of invalid or unwanted requests. It <em class="bcp14">SHOULD NOT</em> be used as an insecure form of access protection. The interpretation of this field is that the request is being performed2106 </pre><p id="rfc.section.6.5.1.p.3">An example is:</p> 2107 <div id="rfc.figure.u.36"></div><pre class="text"> From: webmaster@example.org 2108 </pre><p id="rfc.section.6.5.1.p.5">This header field <em class="bcp14">MAY</em> be used for logging purposes and as a means for identifying the source of invalid or unwanted requests. It <em class="bcp14">SHOULD NOT</em> be used as an insecure form of access protection. The interpretation of this field is that the request is being performed 1979 2109 on behalf of the person given, who accepts responsibility for the method performed. In particular, robot agents <em class="bcp14">SHOULD</em> include this header field so that the person responsible for running the robot can be contacted if problems occur on the receiving 1980 2110 end. 1981 2111 </p> 1982 <p id="rfc.section. 5.5.1.p.6">The Internet e-mail address in this field <em class="bcp14">MAY</em> be separate from the Internet host which issued the request. For example, when a request is passed through a proxy the original2112 <p id="rfc.section.6.5.1.p.6">The Internet e-mail address in this field <em class="bcp14">MAY</em> be separate from the Internet host which issued the request. For example, when a request is passed through a proxy the original 1983 2113 issuer's address <em class="bcp14">SHOULD</em> be used. 1984 2114 </p> 1985 <p id="rfc.section. 5.5.1.p.7">The client <em class="bcp14">SHOULD NOT</em> send the From header field without the user's approval, as it might conflict with the user's privacy interests or their site's2115 <p id="rfc.section.6.5.1.p.7">The client <em class="bcp14">SHOULD NOT</em> send the From header field without the user's approval, as it might conflict with the user's privacy interests or their site's 1986 2116 security policy. It is strongly recommended that the user be able to disable, enable, and modify the value of this field at 1987 2117 any time prior to a request. 1988 2118 </p> 1989 2119 <div id="rfc.iref.r.2"></div> 1990 <h3 id="rfc.section. 5.5.2"><a href="#rfc.section.5.5.2">5.5.2</a> <a id="header.referer" href="#header.referer">Referer</a></h3>1991 <p id="rfc.section. 5.5.2.p.1">The "Referer" [sic] header field allows the client to specify the URI of the resource from which the target URI was obtained2120 <h3 id="rfc.section.6.5.2"><a href="#rfc.section.6.5.2">6.5.2</a> <a id="header.referer" href="#header.referer">Referer</a></h3> 2121 <p id="rfc.section.6.5.2.p.1">The "Referer" [sic] header field allows the client to specify the URI of the resource from which the target URI was obtained 1992 2122 (the "referrer", although the header field is misspelled.). 1993 2123 </p> 1994 <p id="rfc.section. 5.5.2.p.2">The Referer header field allows servers to generate lists of back-links to resources for interest, logging, optimized caching,2124 <p id="rfc.section.6.5.2.p.2">The Referer header field allows servers to generate lists of back-links to resources for interest, logging, optimized caching, 1995 2125 etc. It also allows obsolete or mistyped links to be traced for maintenance. Some servers use Referer as a means of controlling 1996 2126 where they allow links from (so-called "deep linking"), but legitimate requests do not always contain a Referer header field. 1997 2127 </p> 1998 <p id="rfc.section. 5.5.2.p.3">If the target URI was obtained from a source that does not have its own URI (e.g., input from the user keyboard), the Referer2128 <p id="rfc.section.6.5.2.p.3">If the target URI was obtained from a source that does not have its own URI (e.g., input from the user keyboard), the Referer 1999 2129 field <em class="bcp14">MUST</em> either be sent with the value "about:blank", or not be sent at all. Note that this requirement does not apply to sources with 2000 2130 non-HTTP URIs (e.g., FTP). 2001 2131 </p> 2002 <div id="rfc.figure.u. 29"></div><pre class="inline"><span id="rfc.iref.g.25"></span> <a href="#header.referer" class="smpl">Referer</a> = <a href="#imported.abnf" class="smpl">absolute-URI</a> / <a href="#imported.abnf" class="smpl">partial-URI</a>2003 </pre><p id="rfc.section. 5.5.2.p.5">Example:</p>2004 <div id="rfc.figure.u.3 0"></div><pre class="text"> Referer: http://www.example.org/hypertext/Overview.html2005 </pre><p id="rfc.section. 5.5.2.p.7">If the field value is a relative URI, it <em class="bcp14">SHOULD</em> be interpreted relative to the effective request URI. The URI <em class="bcp14">MUST NOT</em> include a fragment. See <a href="#encoding.sensitive.information.in.uris" title="Encoding Sensitive Information in URIs">Section 10.2</a> for security considerations.2132 <div id="rfc.figure.u.37"></div><pre class="inline"><span id="rfc.iref.g.37"></span> <a href="#header.referer" class="smpl">Referer</a> = <a href="#imported.abnf" class="smpl">absolute-URI</a> / <a href="#imported.abnf" class="smpl">partial-URI</a> 2133 </pre><p id="rfc.section.6.5.2.p.5">Example:</p> 2134 <div id="rfc.figure.u.38"></div><pre class="text"> Referer: http://www.example.org/hypertext/Overview.html 2135 </pre><p id="rfc.section.6.5.2.p.7">If the field value is a relative URI, it <em class="bcp14">SHOULD</em> be interpreted relative to the effective request URI. The URI <em class="bcp14">MUST NOT</em> include a fragment. See <a href="#encoding.sensitive.information.in.uris" title="Encoding Sensitive Information in URIs">Section 10.2</a> for security considerations. 2006 2136 </p> 2007 2137 <div id="rfc.iref.u.1"></div> 2008 <h3 id="rfc.section. 5.5.3"><a href="#rfc.section.5.5.3">5.5.3</a> <a id="header.user-agent" href="#header.user-agent">User-Agent</a></h3>2009 <p id="rfc.section. 5.5.3.p.1">The "User-Agent" header field contains information about the user agent originating the request. User agents <em class="bcp14">SHOULD</em> include this field with requests.2010 </p> 2011 <p id="rfc.section. 5.5.3.p.2">Typically, it is used for statistical purposes, the tracing of protocol violations, and tailoring responses to avoid particular2138 <h3 id="rfc.section.6.5.3"><a href="#rfc.section.6.5.3">6.5.3</a> <a id="header.user-agent" href="#header.user-agent">User-Agent</a></h3> 2139 <p id="rfc.section.6.5.3.p.1">The "User-Agent" header field contains information about the user agent originating the request. User agents <em class="bcp14">SHOULD</em> include this field with requests. 2140 </p> 2141 <p id="rfc.section.6.5.3.p.2">Typically, it is used for statistical purposes, the tracing of protocol violations, and tailoring responses to avoid particular 2012 2142 user agent limitations. 2013 2143 </p> 2014 <p id="rfc.section. 5.5.3.p.3">The field can contain multiple product tokens (<a href="#product.tokens" title="Product Tokens">Section 8.2</a>) and comments (<a href="p1-messaging.html#header.fields" title="Header Fields">Section 3.2</a> of <a href="#Part1" id="rfc.xref.Part1.17"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[Part1]</cite></a>) identifying the agent and its significant subproducts. By convention, the product tokens are listed in order of their significance2144 <p id="rfc.section.6.5.3.p.3">The field can contain multiple product tokens (<a href="#product.tokens" title="Product Tokens">Section 4</a>) and comments (<a href="p1-messaging.html#header.fields" title="Header Fields">Section 3.2</a> of <a href="#Part1" id="rfc.xref.Part1.20"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[Part1]</cite></a>) identifying the agent and its significant subproducts. By convention, the product tokens are listed in order of their significance 2015 2145 for identifying the application. 2016 2146 </p> 2017 <p id="rfc.section. 5.5.3.p.4">Because this field is usually sent on every request a user agent makes, implementations are encouraged not to include needlessly2147 <p id="rfc.section.6.5.3.p.4">Because this field is usually sent on every request a user agent makes, implementations are encouraged not to include needlessly 2018 2148 fine-grained detail, and to limit (or even prohibit) the addition of subproducts by third parties. Overly long and detailed 2019 2149 User-Agent field values make requests larger and can also be used to identify ("fingerprint") the user against their wishes. 2020 2150 </p> 2021 <p id="rfc.section. 5.5.3.p.5">Likewise, implementations are encouraged not to use the product tokens of other implementations in order to declare compatibility2151 <p id="rfc.section.6.5.3.p.5">Likewise, implementations are encouraged not to use the product tokens of other implementations in order to declare compatibility 2022 2152 with them, as this circumvents the purpose of the field. Finally, they are encouraged not to use comments to identify products; 2023 2153 doing so makes the field value more difficult to parse. 2024 2154 </p> 2025 <div id="rfc.figure.u.3 1"></div><pre class="inline"><span id="rfc.iref.g.26"></span> <a href="#header.user-agent" class="smpl">User-Agent</a> = <a href="#product.tokens" class="smpl">product</a> *( <a href="#imported.abnf" class="smpl">RWS</a> ( <a href="#product.tokens" class="smpl">product</a> / <a href="#imported.abnf" class="smpl">comment</a> ) )2026 </pre><p id="rfc.section. 5.5.3.p.7">Example:</p>2027 <div id="rfc.figure.u. 32"></div><pre class="text"> User-Agent: CERN-LineMode/2.15 libwww/2.17b32028 </pre><h1 id="rfc.section. 6"><a href="#rfc.section.6">6.</a> <a id="status.codes" href="#status.codes">Response Status Codes</a></h1>2029 <p id="rfc.section. 6.p.1">The status-code element is a 3-digit integer result code of the attempt to understand and satisfy the request.</p>2030 <p id="rfc.section. 6.p.2">HTTP status codes are extensible. HTTP applications are not required to understand the meaning of all registered status codes,2155 <div id="rfc.figure.u.39"></div><pre class="inline"><span id="rfc.iref.g.38"></span> <a href="#header.user-agent" class="smpl">User-Agent</a> = <a href="#product.tokens" class="smpl">product</a> *( <a href="#imported.abnf" class="smpl">RWS</a> ( <a href="#product.tokens" class="smpl">product</a> / <a href="#imported.abnf" class="smpl">comment</a> ) ) 2156 </pre><p id="rfc.section.6.5.3.p.7">Example:</p> 2157 <div id="rfc.figure.u.40"></div><pre class="text"> User-Agent: CERN-LineMode/2.15 libwww/2.17b3 2158 </pre><h1 id="rfc.section.7"><a href="#rfc.section.7">7.</a> <a id="status.codes" href="#status.codes">Response Status Codes</a></h1> 2159 <p id="rfc.section.7.p.1">The status-code element is a 3-digit integer result code of the attempt to understand and satisfy the request.</p> 2160 <p id="rfc.section.7.p.2">HTTP status codes are extensible. HTTP applications are not required to understand the meaning of all registered status codes, 2031 2161 though such understanding is obviously desirable. However, applications <em class="bcp14">MUST</em> understand the class of any status code, as indicated by the first digit, and treat any unrecognized response as being equivalent 2032 2162 to the x00 status code of that class, with the exception that an unrecognized response <em class="bcp14">MUST NOT</em> be cached. For example, if an unrecognized status code of 431 is received by the client, it can safely assume that there was … … 2034 2164 information which will explain the unusual status. 2035 2165 </p> 2036 <p id="rfc.section. 6.p.3">The first digit of the status-code defines the class of response. The last two digits do not have any categorization role.2166 <p id="rfc.section.7.p.3">The first digit of the status-code defines the class of response. The last two digits do not have any categorization role. 2037 2167 There are 5 values for the first digit: 2038 2168 </p> … … 2049 2179 </li> 2050 2180 </ul> 2051 <p id="rfc.section. 6.p.4">For most status codes the response can carry a payload, in which case a <a href="#header.content-type" class="smpl">Content-Type</a> header field indicates the payload's media type (<a href="#header.content-type" id="rfc.xref.header.content-type.2" title="Content-Type">Section 3.1.1</a>).2052 </p> 2053 <h2 id="rfc.section. 6.1"><a href="#rfc.section.6.1">6.1</a> <a id="overview.of.status.codes" href="#overview.of.status.codes">Overview of Status Codes</a></h2>2054 <p id="rfc.section. 6.1.p.1">The status codes listed below are defined in this specification, <a href="p4-conditional.html#status.code.definitions" title="Status Code Definitions">Section 4</a> of <a href="#Part4" id="rfc.xref.Part4.7"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Conditional Requests">[Part4]</cite></a>, <a href="p5-range.html#status.code.definitions" title="Status Code Definitions">Section 3</a> of <a href="#Part5" id="rfc.xref.Part5.7"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Range Requests">[Part5]</cite></a>, and <a href="p7-auth.html#status.code.definitions" title="Status Code Definitions">Section 3</a> of <a href="#Part7" id="rfc.xref.Part7.3"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Authentication">[Part7]</cite></a>. The reason phrases listed here are only recommendations — they can be replaced by local equivalents without affecting the2181 <p id="rfc.section.7.p.4">For most status codes the response can carry a payload, in which case a <a href="#header.content-type" class="smpl">Content-Type</a> header field indicates the payload's media type (<a href="#header.content-type" id="rfc.xref.header.content-type.3" title="Content-Type">Section 3.1.1.5</a>). 2182 </p> 2183 <h2 id="rfc.section.7.1"><a href="#rfc.section.7.1">7.1</a> <a id="overview.of.status.codes" href="#overview.of.status.codes">Overview of Status Codes</a></h2> 2184 <p id="rfc.section.7.1.p.1">The status codes listed below are defined in this specification, <a href="p4-conditional.html#status.code.definitions" title="Status Code Definitions">Section 4</a> of <a href="#Part4" id="rfc.xref.Part4.7"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Conditional Requests">[Part4]</cite></a>, <a href="p5-range.html#status.code.definitions" title="Status Code Definitions">Section 3</a> of <a href="#Part5" id="rfc.xref.Part5.7"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Range Requests">[Part5]</cite></a>, and <a href="p7-auth.html#status.code.definitions" title="Status Code Definitions">Section 3</a> of <a href="#Part7" id="rfc.xref.Part7.3"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Authentication">[Part7]</cite></a>. The reason phrases listed here are only recommendations — they can be replaced by local equivalents without affecting the 2055 2185 protocol. 2056 2186 </p> … … 2068 2198 <td class="left">100</td> 2069 2199 <td class="left">Continue</td> 2070 <td class="left"><a href="#status.100" id="rfc.xref.status.100.3" title="100 Continue">Section 6.2.1</a></td>2200 <td class="left"><a href="#status.100" id="rfc.xref.status.100.3" title="100 Continue">Section 7.2.1</a></td> 2071 2201 </tr> 2072 2202 <tr> 2073 2203 <td class="left">101</td> 2074 2204 <td class="left">Switching Protocols</td> 2075 <td class="left"><a href="#status.101" id="rfc.xref.status.101.1" title="101 Switching Protocols">Section 6.2.2</a></td>2205 <td class="left"><a href="#status.101" id="rfc.xref.status.101.1" title="101 Switching Protocols">Section 7.2.2</a></td> 2076 2206 </tr> 2077 2207 <tr> 2078 2208 <td class="left">200</td> 2079 2209 <td class="left">OK</td> 2080 <td class="left"><a href="#status.200" id="rfc.xref.status.200.1" title="200 OK">Section 6.3.1</a></td>2210 <td class="left"><a href="#status.200" id="rfc.xref.status.200.1" title="200 OK">Section 7.3.1</a></td> 2081 2211 </tr> 2082 2212 <tr> 2083 2213 <td class="left">201</td> 2084 2214 <td class="left">Created</td> 2085 <td class="left"><a href="#status.201" id="rfc.xref.status.201.1" title="201 Created">Section 6.3.2</a></td>2215 <td class="left"><a href="#status.201" id="rfc.xref.status.201.1" title="201 Created">Section 7.3.2</a></td> 2086 2216 </tr> 2087 2217 <tr> 2088 2218 <td class="left">202</td> 2089 2219 <td class="left">Accepted</td> 2090 <td class="left"><a href="#status.202" id="rfc.xref.status.202.1" title="202 Accepted">Section 6.3.3</a></td>2220 <td class="left"><a href="#status.202" id="rfc.xref.status.202.1" title="202 Accepted">Section 7.3.3</a></td> 2091 2221 </tr> 2092 2222 <tr> 2093 2223 <td class="left">203</td> 2094 2224 <td class="left">Non-Authoritative Information</td> 2095 <td class="left"><a href="#status.203" id="rfc.xref.status.203.1" title="203 Non-Authoritative Information">Section 6.3.4</a></td>2225 <td class="left"><a href="#status.203" id="rfc.xref.status.203.1" title="203 Non-Authoritative Information">Section 7.3.4</a></td> 2096 2226 </tr> 2097 2227 <tr> 2098 2228 <td class="left">204</td> 2099 2229 <td class="left">No Content</td> 2100 <td class="left"><a href="#status.204" id="rfc.xref.status.204.1" title="204 No Content">Section 6.3.5</a></td>2230 <td class="left"><a href="#status.204" id="rfc.xref.status.204.1" title="204 No Content">Section 7.3.5</a></td> 2101 2231 </tr> 2102 2232 <tr> 2103 2233 <td class="left">205</td> 2104 2234 <td class="left">Reset Content</td> 2105 <td class="left"><a href="#status.205" id="rfc.xref.status.205.1" title="205 Reset Content">Section 6.3.6</a></td>2235 <td class="left"><a href="#status.205" id="rfc.xref.status.205.1" title="205 Reset Content">Section 7.3.6</a></td> 2106 2236 </tr> 2107 2237 <tr> … … 2113 2243 <td class="left">300</td> 2114 2244 <td class="left">Multiple Choices</td> 2115 <td class="left"><a href="#status.300" id="rfc.xref.status.300.1" title="300 Multiple Choices">Section 6.4.1</a></td>2245 <td class="left"><a href="#status.300" id="rfc.xref.status.300.1" title="300 Multiple Choices">Section 7.4.1</a></td> 2116 2246 </tr> 2117 2247 <tr> 2118 2248 <td class="left">301</td> 2119 2249 <td class="left">Moved Permanently</td> 2120 <td class="left"><a href="#status.301" id="rfc.xref.status.301.1" title="301 Moved Permanently">Section 6.4.2</a></td>2250 <td class="left"><a href="#status.301" id="rfc.xref.status.301.1" title="301 Moved Permanently">Section 7.4.2</a></td> 2121 2251 </tr> 2122 2252 <tr> 2123 2253 <td class="left">302</td> 2124 2254 <td class="left">Found</td> 2125 <td class="left"><a href="#status.302" id="rfc.xref.status.302.1" title="302 Found">Section 6.4.3</a></td>2255 <td class="left"><a href="#status.302" id="rfc.xref.status.302.1" title="302 Found">Section 7.4.3</a></td> 2126 2256 </tr> 2127 2257 <tr> 2128 2258 <td class="left">303</td> 2129 2259 <td class="left">See Other</td> 2130 <td class="left"><a href="#status.303" id="rfc.xref.status.303.1" title="303 See Other">Section 6.4.4</a></td>2260 <td class="left"><a href="#status.303" id="rfc.xref.status.303.1" title="303 See Other">Section 7.4.4</a></td> 2131 2261 </tr> 2132 2262 <tr> … … 2138 2268 <td class="left">305</td> 2139 2269 <td class="left">Use Proxy</td> 2140 <td class="left"><a href="#status.305" id="rfc.xref.status.305.1" title="305 Use Proxy">Section 6.4.5</a></td>2270 <td class="left"><a href="#status.305" id="rfc.xref.status.305.1" title="305 Use Proxy">Section 7.4.5</a></td> 2141 2271 </tr> 2142 2272 <tr> 2143 2273 <td class="left">307</td> 2144 2274 <td class="left">Temporary Redirect</td> 2145 <td class="left"><a href="#status.307" id="rfc.xref.status.307.1" title="307 Temporary Redirect">Section 6.4.7</a></td>2275 <td class="left"><a href="#status.307" id="rfc.xref.status.307.1" title="307 Temporary Redirect">Section 7.4.7</a></td> 2146 2276 </tr> 2147 2277 <tr> 2148 2278 <td class="left">400</td> 2149 2279 <td class="left">Bad Request</td> 2150 <td class="left"><a href="#status.400" id="rfc.xref.status.400.1" title="400 Bad Request">Section 6.5.1</a></td>2280 <td class="left"><a href="#status.400" id="rfc.xref.status.400.1" title="400 Bad Request">Section 7.5.1</a></td> 2151 2281 </tr> 2152 2282 <tr> … … 2158 2288 <td class="left">402</td> 2159 2289 <td class="left">Payment Required</td> 2160 <td class="left"><a href="#status.402" id="rfc.xref.status.402.1" title="402 Payment Required">Section 6.5.2</a></td>2290 <td class="left"><a href="#status.402" id="rfc.xref.status.402.1" title="402 Payment Required">Section 7.5.2</a></td> 2161 2291 </tr> 2162 2292 <tr> 2163 2293 <td class="left">403</td> 2164 2294 <td class="left">Forbidden</td> 2165 <td class="left"><a href="#status.403" id="rfc.xref.status.403.1" title="403 Forbidden">Section 6.5.3</a></td>2295 <td class="left"><a href="#status.403" id="rfc.xref.status.403.1" title="403 Forbidden">Section 7.5.3</a></td> 2166 2296 </tr> 2167 2297 <tr> 2168 2298 <td class="left">404</td> 2169 2299 <td class="left">Not Found</td> 2170 <td class="left"><a href="#status.404" id="rfc.xref.status.404.1" title="404 Not Found">Section 6.5.4</a></td>2300 <td class="left"><a href="#status.404" id="rfc.xref.status.404.1" title="404 Not Found">Section 7.5.4</a></td> 2171 2301 </tr> 2172 2302 <tr> 2173 2303 <td class="left">405</td> 2174 2304 <td class="left">Method Not Allowed</td> 2175 <td class="left"><a href="#status.405" id="rfc.xref.status.405.1" title="405 Method Not Allowed">Section 6.5.5</a></td>2305 <td class="left"><a href="#status.405" id="rfc.xref.status.405.1" title="405 Method Not Allowed">Section 7.5.5</a></td> 2176 2306 </tr> 2177 2307 <tr> 2178 2308 <td class="left">406</td> 2179 2309 <td class="left">Not Acceptable</td> 2180 <td class="left"><a href="#status.406" id="rfc.xref.status.406.1" title="406 Not Acceptable">Section 6.5.6</a></td>2310 <td class="left"><a href="#status.406" id="rfc.xref.status.406.1" title="406 Not Acceptable">Section 7.5.6</a></td> 2181 2311 </tr> 2182 2312 <tr> … … 2188 2318 <td class="left">408</td> 2189 2319 <td class="left">Request Time-out</td> 2190 <td class="left"><a href="#status.408" id="rfc.xref.status.408.1" title="408 Request Timeout">Section 6.5.7</a></td>2320 <td class="left"><a href="#status.408" id="rfc.xref.status.408.1" title="408 Request Timeout">Section 7.5.7</a></td> 2191 2321 </tr> 2192 2322 <tr> 2193 2323 <td class="left">409</td> 2194 2324 <td class="left">Conflict</td> 2195 <td class="left"><a href="#status.409" id="rfc.xref.status.409.1" title="409 Conflict">Section 6.5.8</a></td>2325 <td class="left"><a href="#status.409" id="rfc.xref.status.409.1" title="409 Conflict">Section 7.5.8</a></td> 2196 2326 </tr> 2197 2327 <tr> 2198 2328 <td class="left">410</td> 2199 2329 <td class="left">Gone</td> 2200 <td class="left"><a href="#status.410" id="rfc.xref.status.410.1" title="410 Gone">Section 6.5.9</a></td>2330 <td class="left"><a href="#status.410" id="rfc.xref.status.410.1" title="410 Gone">Section 7.5.9</a></td> 2201 2331 </tr> 2202 2332 <tr> 2203 2333 <td class="left">411</td> 2204 2334 <td class="left">Length Required</td> 2205 <td class="left"><a href="#status.411" id="rfc.xref.status.411.1" title="411 Length Required">Section 6.5.10</a></td>2335 <td class="left"><a href="#status.411" id="rfc.xref.status.411.1" title="411 Length Required">Section 7.5.10</a></td> 2206 2336 </tr> 2207 2337 <tr> … … 2213 2343 <td class="left">413</td> 2214 2344 <td class="left">Request Representation Too Large</td> 2215 <td class="left"><a href="#status.413" id="rfc.xref.status.413.1" title="413 Request Representation Too Large">Section 6.5.11</a></td>2345 <td class="left"><a href="#status.413" id="rfc.xref.status.413.1" title="413 Request Representation Too Large">Section 7.5.11</a></td> 2216 2346 </tr> 2217 2347 <tr> 2218 2348 <td class="left">414</td> 2219 2349 <td class="left">URI Too Long</td> 2220 <td class="left"><a href="#status.414" id="rfc.xref.status.414.1" title="414 URI Too Long">Section 6.5.12</a></td>2350 <td class="left"><a href="#status.414" id="rfc.xref.status.414.1" title="414 URI Too Long">Section 7.5.12</a></td> 2221 2351 </tr> 2222 2352 <tr> 2223 2353 <td class="left">415</td> 2224 2354 <td class="left">Unsupported Media Type</td> 2225 <td class="left"><a href="#status.415" id="rfc.xref.status.415.1" title="415 Unsupported Media Type">Section 6.5.13</a></td>2355 <td class="left"><a href="#status.415" id="rfc.xref.status.415.1" title="415 Unsupported Media Type">Section 7.5.13</a></td> 2226 2356 </tr> 2227 2357 <tr> … … 2233 2363 <td class="left">417</td> 2234 2364 <td class="left">Expectation Failed</td> 2235 <td class="left"><a href="#status.417" id="rfc.xref.status.417.1" title="417 Expectation Failed">Section 6.5.14</a></td>2365 <td class="left"><a href="#status.417" id="rfc.xref.status.417.1" title="417 Expectation Failed">Section 7.5.14</a></td> 2236 2366 </tr> 2237 2367 <tr> 2238 2368 <td class="left">426</td> 2239 2369 <td class="left">Upgrade Required</td> 2240 <td class="left"><a href="#status.426" id="rfc.xref.status.426.1" title="426 Upgrade Required">Section 6.5.15</a></td>2370 <td class="left"><a href="#status.426" id="rfc.xref.status.426.1" title="426 Upgrade Required">Section 7.5.15</a></td> 2241 2371 </tr> 2242 2372 <tr> 2243 2373 <td class="left">500</td> 2244 2374 <td class="left">Internal Server Error</td> 2245 <td class="left"><a href="#status.500" id="rfc.xref.status.500.1" title="500 Internal Server Error">Section 6.6.1</a></td>2375 <td class="left"><a href="#status.500" id="rfc.xref.status.500.1" title="500 Internal Server Error">Section 7.6.1</a></td> 2246 2376 </tr> 2247 2377 <tr> 2248 2378 <td class="left">501</td> 2249 2379 <td class="left">Not Implemented</td> 2250 <td class="left"><a href="#status.501" id="rfc.xref.status.501.1" title="501 Not Implemented">Section 6.6.2</a></td>2380 <td class="left"><a href="#status.501" id="rfc.xref.status.501.1" title="501 Not Implemented">Section 7.6.2</a></td> 2251 2381 </tr> 2252 2382 <tr> 2253 2383 <td class="left">502</td> 2254 2384 <td class="left">Bad Gateway</td> 2255 <td class="left"><a href="#status.502" id="rfc.xref.status.502.1" title="502 Bad Gateway">Section 6.6.3</a></td>2385 <td class="left"><a href="#status.502" id="rfc.xref.status.502.1" title="502 Bad Gateway">Section 7.6.3</a></td> 2256 2386 </tr> 2257 2387 <tr> 2258 2388 <td class="left">503</td> 2259 2389 <td class="left">Service Unavailable</td> 2260 <td class="left"><a href="#status.503" id="rfc.xref.status.503.1" title="503 Service Unavailable">Section 6.6.4</a></td>2390 <td class="left"><a href="#status.503" id="rfc.xref.status.503.1" title="503 Service Unavailable">Section 7.6.4</a></td> 2261 2391 </tr> 2262 2392 <tr> 2263 2393 <td class="left">504</td> 2264 2394 <td class="left">Gateway Time-out</td> 2265 <td class="left"><a href="#status.504" id="rfc.xref.status.504.1" title="504 Gateway Timeout">Section 6.6.5</a></td>2395 <td class="left"><a href="#status.504" id="rfc.xref.status.504.1" title="504 Gateway Timeout">Section 7.6.5</a></td> 2266 2396 </tr> 2267 2397 <tr> 2268 2398 <td class="left">505</td> 2269 2399 <td class="left">HTTP Version not supported</td> 2270 <td class="left"><a href="#status.505" id="rfc.xref.status.505.1" title="505 HTTP Version Not Supported">Section 6.6.6</a></td>2400 <td class="left"><a href="#status.505" id="rfc.xref.status.505.1" title="505 HTTP Version Not Supported">Section 7.6.6</a></td> 2271 2401 </tr> 2272 2402 </tbody> 2273 2403 </table> 2274 2404 </div> 2275 <p id="rfc.section. 6.1.p.2">Note that this list is not exhaustive — it does not include extension status codes defined in other specifications.</p>2276 <h2 id="rfc.section. 6.2"><a href="#rfc.section.6.2">6.2</a> <a id="status.1xx" href="#status.1xx">Informational 1xx</a></h2>2277 <div id="rfc.iref. 53"></div>2405 <p id="rfc.section.7.1.p.2">Note that this list is not exhaustive — it does not include extension status codes defined in other specifications.</p> 2406 <h2 id="rfc.section.7.2"><a href="#rfc.section.7.2">7.2</a> <a id="status.1xx" href="#status.1xx">Informational 1xx</a></h2> 2407 <div id="rfc.iref.67"></div> 2278 2408 <div id="rfc.iref.s.2"></div> 2279 <p id="rfc.section. 6.2.p.1">This class of status code indicates a provisional response, consisting only of the status-line and optional header fields,2409 <p id="rfc.section.7.2.p.1">This class of status code indicates a provisional response, consisting only of the status-line and optional header fields, 2280 2410 and is terminated by an empty line. There are no required header fields for this class of status code. Since HTTP/1.0 did 2281 2411 not define any 1xx status codes, servers <em class="bcp14">MUST NOT</em> send a 1xx response to an HTTP/1.0 client except under experimental conditions. 2282 2412 </p> 2283 <p id="rfc.section. 6.2.p.2">A client <em class="bcp14">MUST</em> be prepared to accept one or more 1xx status responses prior to a regular response, even if the client does not expect a <a href="#status.100" class="smpl">1002413 <p id="rfc.section.7.2.p.2">A client <em class="bcp14">MUST</em> be prepared to accept one or more 1xx status responses prior to a regular response, even if the client does not expect a <a href="#status.100" class="smpl">100 2284 2414 (Continue)</a> status message. Unexpected 1xx status responses <em class="bcp14">MAY</em> be ignored by a user agent. 2285 2415 </p> 2286 <p id="rfc.section. 6.2.p.3">Proxies <em class="bcp14">MUST</em> forward 1xx responses, unless the connection between the proxy and its client has been closed, or unless the proxy itself2416 <p id="rfc.section.7.2.p.3">Proxies <em class="bcp14">MUST</em> forward 1xx responses, unless the connection between the proxy and its client has been closed, or unless the proxy itself 2287 2417 requested the generation of the 1xx response. (For example, if a proxy adds an "Expect: 100-continue" field when it forwards 2288 2418 a request, then it need not forward the corresponding <a href="#status.100" class="smpl">100 (Continue)</a> response(s).) 2289 2419 </p> 2290 <div id="rfc.iref. 54"></div>2291 <h3 id="rfc.section. 6.2.1"><a href="#rfc.section.6.2.1">6.2.1</a> <a id="status.100" href="#status.100">100 Continue</a></h3>2292 <p id="rfc.section. 6.2.1.p.1">The client <em class="bcp14">SHOULD</em> continue with its request. This interim response is used to inform the client that the initial part of the request has been2420 <div id="rfc.iref.68"></div> 2421 <h3 id="rfc.section.7.2.1"><a href="#rfc.section.7.2.1">7.2.1</a> <a id="status.100" href="#status.100">100 Continue</a></h3> 2422 <p id="rfc.section.7.2.1.p.1">The client <em class="bcp14">SHOULD</em> continue with its request. This interim response is used to inform the client that the initial part of the request has been 2293 2423 received and has not yet been rejected by the server. The client <em class="bcp14">SHOULD</em> continue by sending the remainder of the request or, if the request has already been completed, ignore this response. The 2294 server <em class="bcp14">MUST</em> send a final response after the request has been completed. See <a href="#use.of.the.100.status" title="Use of the 100 (Continue) Status">Section 5.1.2.1</a> for detailed discussion of the use and handling of this status code.2295 </p> 2296 <div id="rfc.iref. 54"></div>2297 <h3 id="rfc.section. 6.2.2"><a href="#rfc.section.6.2.2">6.2.2</a> <a id="status.101" href="#status.101">101 Switching Protocols</a></h3>2298 <p id="rfc.section. 6.2.2.p.1">The server understands and is willing to comply with the client's request, via the <a href="p1-messaging.html#header.upgrade" class="smpl">Upgrade</a> message header field (<a href="p1-messaging.html#header.upgrade" title="Upgrade">Section 6.3</a> of <a href="#Part1" id="rfc.xref.Part1.18"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[Part1]</cite></a>), for a change in the application protocol being used on this connection. The server will switch protocols to those defined2424 server <em class="bcp14">MUST</em> send a final response after the request has been completed. See <a href="#use.of.the.100.status" title="Use of the 100 (Continue) Status">Section 6.1.2.1</a> for detailed discussion of the use and handling of this status code. 2425 </p> 2426 <div id="rfc.iref.68"></div> 2427 <h3 id="rfc.section.7.2.2"><a href="#rfc.section.7.2.2">7.2.2</a> <a id="status.101" href="#status.101">101 Switching Protocols</a></h3> 2428 <p id="rfc.section.7.2.2.p.1">The server understands and is willing to comply with the client's request, via the <a href="p1-messaging.html#header.upgrade" class="smpl">Upgrade</a> message header field (<a href="p1-messaging.html#header.upgrade" title="Upgrade">Section 6.3</a> of <a href="#Part1" id="rfc.xref.Part1.21"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[Part1]</cite></a>), for a change in the application protocol being used on this connection. The server will switch protocols to those defined 2299 2429 by the response's Upgrade header field immediately after the empty line which terminates the 101 response. 2300 2430 </p> 2301 <p id="rfc.section. 6.2.2.p.2">The protocol <em class="bcp14">SHOULD</em> be switched only when it is advantageous to do so. For example, switching to a newer version of HTTP is advantageous over2431 <p id="rfc.section.7.2.2.p.2">The protocol <em class="bcp14">SHOULD</em> be switched only when it is advantageous to do so. For example, switching to a newer version of HTTP is advantageous over 2302 2432 older versions, and switching to a real-time, synchronous protocol might be advantageous when delivering resources that use 2303 2433 such features. 2304 2434 </p> 2305 <h2 id="rfc.section. 6.3"><a href="#rfc.section.6.3">6.3</a> <a id="status.2xx" href="#status.2xx">Successful 2xx</a></h2>2306 <div id="rfc.iref. 54"></div>2435 <h2 id="rfc.section.7.3"><a href="#rfc.section.7.3">7.3</a> <a id="status.2xx" href="#status.2xx">Successful 2xx</a></h2> 2436 <div id="rfc.iref.68"></div> 2307 2437 <div id="rfc.iref.s.3"></div> 2308 <p id="rfc.section. 6.3.p.1">This class of status code indicates that the client's request was successfully received, understood, and accepted.</p>2309 <div id="rfc.iref. 55"></div>2310 <h3 id="rfc.section. 6.3.1"><a href="#rfc.section.6.3.1">6.3.1</a> <a id="status.200" href="#status.200">200 OK</a></h3>2311 <p id="rfc.section. 6.3.1.p.1">The request has succeeded. The payload returned with the response is dependent on the method used in the request, for example: </p>2438 <p id="rfc.section.7.3.p.1">This class of status code indicates that the client's request was successfully received, understood, and accepted.</p> 2439 <div id="rfc.iref.69"></div> 2440 <h3 id="rfc.section.7.3.1"><a href="#rfc.section.7.3.1">7.3.1</a> <a id="status.200" href="#status.200">200 OK</a></h3> 2441 <p id="rfc.section.7.3.1.p.1">The request has succeeded. The payload returned with the response is dependent on the method used in the request, for example: </p> 2312 2442 <dl> 2313 2443 <dt>GET</dt> … … 2320 2450 <dd>a representation containing the request message as received by the end server.</dd> 2321 2451 </dl> 2322 <p id="rfc.section. 6.3.1.p.2">Caches <em class="bcp14">MAY</em> use a heuristic (see <a href="p6-cache.html#heuristic.freshness" title="Calculating Heuristic Freshness">Section 4.1.2</a> of <a href="#Part6" id="rfc.xref.Part6.8"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Caching">[Part6]</cite></a>) to determine freshness for 200 responses.2323 </p> 2324 <div id="rfc.iref. 55"></div>2325 <h3 id="rfc.section. 6.3.2"><a href="#rfc.section.6.3.2">6.3.2</a> <a id="status.201" href="#status.201">201 Created</a></h3>2326 <p id="rfc.section. 6.3.2.p.1">The request has been fulfilled and has resulted in one or more new resources being created.</p>2327 <p id="rfc.section. 6.3.2.p.2">Newly created resources are typically linked to from the response payload, with the most relevant URI also being carried in2452 <p id="rfc.section.7.3.1.p.2">Caches <em class="bcp14">MAY</em> use a heuristic (see <a href="p6-cache.html#heuristic.freshness" title="Calculating Heuristic Freshness">Section 4.1.2</a> of <a href="#Part6" id="rfc.xref.Part6.8"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Caching">[Part6]</cite></a>) to determine freshness for 200 responses. 2453 </p> 2454 <div id="rfc.iref.69"></div> 2455 <h3 id="rfc.section.7.3.2"><a href="#rfc.section.7.3.2">7.3.2</a> <a id="status.201" href="#status.201">201 Created</a></h3> 2456 <p id="rfc.section.7.3.2.p.1">The request has been fulfilled and has resulted in one or more new resources being created.</p> 2457 <p id="rfc.section.7.3.2.p.2">Newly created resources are typically linked to from the response payload, with the most relevant URI also being carried in 2328 2458 the <a href="#header.location" class="smpl">Location</a> header field. If the newly created resource's URI is the same as the Effective Request URI, this information can be omitted 2329 2459 (e.g., in the case of a response to a PUT request). 2330 2460 </p> 2331 <p id="rfc.section. 6.3.2.p.3">The origin server <em class="bcp14">MUST</em> create the resource(s) before returning the 201 status code. If the action cannot be carried out immediately, the server <em class="bcp14">SHOULD</em> respond with <a href="#status.202" class="smpl">202 (Accepted)</a> response instead.2332 </p> 2333 <p id="rfc.section. 6.3.2.p.4">A 201 response <em class="bcp14">MAY</em> contain an <a href="p4-conditional.html#header.etag" class="smpl">ETag</a> response header field indicating the current value of the entity-tag for the representation of the resource identified by2461 <p id="rfc.section.7.3.2.p.3">The origin server <em class="bcp14">MUST</em> create the resource(s) before returning the 201 status code. If the action cannot be carried out immediately, the server <em class="bcp14">SHOULD</em> respond with <a href="#status.202" class="smpl">202 (Accepted)</a> response instead. 2462 </p> 2463 <p id="rfc.section.7.3.2.p.4">A 201 response <em class="bcp14">MAY</em> contain an <a href="p4-conditional.html#header.etag" class="smpl">ETag</a> response header field indicating the current value of the entity-tag for the representation of the resource identified by 2334 2464 the <a href="#header.location" class="smpl">Location</a> header field or, in case the Location header field was omitted, by the Effective Request URI (see <a href="p4-conditional.html#header.etag" title="ETag">Section 2.3</a> of <a href="#Part4" id="rfc.xref.Part4.10"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Conditional Requests">[Part4]</cite></a>). 2335 2465 </p> 2336 <div id="rfc.iref. 55"></div>2337 <h3 id="rfc.section. 6.3.3"><a href="#rfc.section.6.3.3">6.3.3</a> <a id="status.202" href="#status.202">202 Accepted</a></h3>2338 <p id="rfc.section. 6.3.3.p.1">The request has been accepted for processing, but the processing has not been completed. The request might or might not eventually2466 <div id="rfc.iref.69"></div> 2467 <h3 id="rfc.section.7.3.3"><a href="#rfc.section.7.3.3">7.3.3</a> <a id="status.202" href="#status.202">202 Accepted</a></h3> 2468 <p id="rfc.section.7.3.3.p.1">The request has been accepted for processing, but the processing has not been completed. The request might or might not eventually 2339 2469 be acted upon, as it might be disallowed when processing actually takes place. There is no facility for re-sending a status 2340 2470 code from an asynchronous operation such as this. 2341 2471 </p> 2342 <p id="rfc.section. 6.3.3.p.2">The 202 response is intentionally non-committal. Its purpose is to allow a server to accept a request for some other process2472 <p id="rfc.section.7.3.3.p.2">The 202 response is intentionally non-committal. Its purpose is to allow a server to accept a request for some other process 2343 2473 (perhaps a batch-oriented process that is only run once per day) without requiring that the user agent's connection to the 2344 2474 server persist until the process is completed. The representation returned with this response <em class="bcp14">SHOULD</em> include an indication of the request's current status and either a pointer to a status monitor or some estimate of when the 2345 2475 user can expect the request to be fulfilled. 2346 2476 </p> 2347 <div id="rfc.iref. 55"></div>2348 <h3 id="rfc.section. 6.3.4"><a href="#rfc.section.6.3.4">6.3.4</a> <a id="status.203" href="#status.203">203 Non-Authoritative Information</a></h3>2349 <p id="rfc.section. 6.3.4.p.1">The representation in the response has been transformed or otherwise modified by a transforming proxy (<a href="p1-messaging.html#intermediaries" title="Intermediaries">Section 2.3</a> of <a href="#Part1" id="rfc.xref.Part1.19"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[Part1]</cite></a>). Note that the behavior of transforming intermediaries is controlled by the no-transform Cache-Control directive (<a href="p6-cache.html#header.cache-control" title="Cache-Control">Section 7.2</a> of <a href="#Part6" id="rfc.xref.Part6.9"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Caching">[Part6]</cite></a>).2350 </p> 2351 <p id="rfc.section. 6.3.4.p.2">This status code is only appropriate when the response status code would have been <a href="#status.200" class="smpl">200 (OK)</a> otherwise. When the status code before transformation would have been different, the 214 Transformation Applied warn-code2477 <div id="rfc.iref.69"></div> 2478 <h3 id="rfc.section.7.3.4"><a href="#rfc.section.7.3.4">7.3.4</a> <a id="status.203" href="#status.203">203 Non-Authoritative Information</a></h3> 2479 <p id="rfc.section.7.3.4.p.1">The representation in the response has been transformed or otherwise modified by a transforming proxy (<a href="p1-messaging.html#intermediaries" title="Intermediaries">Section 2.3</a> of <a href="#Part1" id="rfc.xref.Part1.22"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[Part1]</cite></a>). Note that the behavior of transforming intermediaries is controlled by the no-transform Cache-Control directive (<a href="p6-cache.html#header.cache-control" title="Cache-Control">Section 7.2</a> of <a href="#Part6" id="rfc.xref.Part6.9"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Caching">[Part6]</cite></a>). 2480 </p> 2481 <p id="rfc.section.7.3.4.p.2">This status code is only appropriate when the response status code would have been <a href="#status.200" class="smpl">200 (OK)</a> otherwise. When the status code before transformation would have been different, the 214 Transformation Applied warn-code 2352 2482 (<a href="p6-cache.html#header.warning" title="Warning">Section 7.5</a> of <a href="#Part6" id="rfc.xref.Part6.10"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Caching">[Part6]</cite></a>) is appropriate. 2353 2483 </p> 2354 <p id="rfc.section. 6.3.4.p.3">Caches <em class="bcp14">MAY</em> use a heuristic (see <a href="p6-cache.html#heuristic.freshness" title="Calculating Heuristic Freshness">Section 4.1.2</a> of <a href="#Part6" id="rfc.xref.Part6.11"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Caching">[Part6]</cite></a>) to determine freshness for 203 responses.2355 </p> 2356 <div id="rfc.iref. 55"></div>2357 <h3 id="rfc.section. 6.3.5"><a href="#rfc.section.6.3.5">6.3.5</a> <a id="status.204" href="#status.204">204 No Content</a></h3>2358 <p id="rfc.section. 6.3.5.p.1">The 204 (No Content) status code indicates that the server has successfully fulfilled the request and that there is no additional2484 <p id="rfc.section.7.3.4.p.3">Caches <em class="bcp14">MAY</em> use a heuristic (see <a href="p6-cache.html#heuristic.freshness" title="Calculating Heuristic Freshness">Section 4.1.2</a> of <a href="#Part6" id="rfc.xref.Part6.11"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Caching">[Part6]</cite></a>) to determine freshness for 203 responses. 2485 </p> 2486 <div id="rfc.iref.69"></div> 2487 <h3 id="rfc.section.7.3.5"><a href="#rfc.section.7.3.5">7.3.5</a> <a id="status.204" href="#status.204">204 No Content</a></h3> 2488 <p id="rfc.section.7.3.5.p.1">The 204 (No Content) status code indicates that the server has successfully fulfilled the request and that there is no additional 2359 2489 content to return in the response payload body. Metadata in the response header fields refer to the target resource and its 2360 2490 current representation after the requested action. 2361 2491 </p> 2362 <p id="rfc.section. 6.3.5.p.2">For example, if a 204 status code is received in response to a PUT request and the response contains an <a href="p4-conditional.html#header.etag" class="smpl">ETag</a> header field, then the PUT was successful and the ETag field-value contains the entity-tag for the new representation of that2492 <p id="rfc.section.7.3.5.p.2">For example, if a 204 status code is received in response to a PUT request and the response contains an <a href="p4-conditional.html#header.etag" class="smpl">ETag</a> header field, then the PUT was successful and the ETag field-value contains the entity-tag for the new representation of that 2363 2493 target resource. 2364 2494 </p> 2365 <p id="rfc.section. 6.3.5.p.3">The 204 response allows a server to indicate that the action has been successfully applied to the target resource while implying2495 <p id="rfc.section.7.3.5.p.3">The 204 response allows a server to indicate that the action has been successfully applied to the target resource while implying 2366 2496 that the user agent <em class="bcp14">SHOULD NOT</em> traverse away from its current "document view" (if any). The server assumes that the user agent will provide some indication 2367 2497 of the success to its user, in accord with its own interface, and apply any new or updated metadata in the response to the 2368 2498 active representation. 2369 2499 </p> 2370 <p id="rfc.section. 6.3.5.p.4">For example, a 204 status code is commonly used with document editing interfaces corresponding to a "save" action, such that2500 <p id="rfc.section.7.3.5.p.4">For example, a 204 status code is commonly used with document editing interfaces corresponding to a "save" action, such that 2371 2501 the document being saved remains available to the user for editing. It is also frequently used with interfaces that expect 2372 2502 automated data transfers to be prevalent, such as within distributed version control systems. 2373 2503 </p> 2374 <p id="rfc.section. 6.3.5.p.5">The 204 response <em class="bcp14">MUST NOT</em> include a message body, and thus is always terminated by the first empty line after the header fields.2375 </p> 2376 <div id="rfc.iref. 55"></div>2377 <h3 id="rfc.section. 6.3.6"><a href="#rfc.section.6.3.6">6.3.6</a> <a id="status.205" href="#status.205">205 Reset Content</a></h3>2378 <p id="rfc.section. 6.3.6.p.1">The server has fulfilled the request and the user agent <em class="bcp14">SHOULD</em> reset the document view which caused the request to be sent. This response is primarily intended to allow input for actions2504 <p id="rfc.section.7.3.5.p.5">The 204 response <em class="bcp14">MUST NOT</em> include a message body, and thus is always terminated by the first empty line after the header fields. 2505 </p> 2506 <div id="rfc.iref.69"></div> 2507 <h3 id="rfc.section.7.3.6"><a href="#rfc.section.7.3.6">7.3.6</a> <a id="status.205" href="#status.205">205 Reset Content</a></h3> 2508 <p id="rfc.section.7.3.6.p.1">The server has fulfilled the request and the user agent <em class="bcp14">SHOULD</em> reset the document view which caused the request to be sent. This response is primarily intended to allow input for actions 2379 2509 to take place via user input, followed by a clearing of the form in which the input is given so that the user can easily initiate 2380 2510 another input action. 2381 2511 </p> 2382 <p id="rfc.section. 6.3.6.p.2">The message body included with the response <em class="bcp14">MUST</em> be empty. Note that receivers still need to parse the response according to the algorithm defined in <a href="p1-messaging.html#message.body" title="Message Body">Section 3.3</a> of <a href="#Part1" id="rfc.xref.Part1.20"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[Part1]</cite></a>.2383 </p> 2384 <h2 id="rfc.section. 6.4"><a href="#rfc.section.6.4">6.4</a> <a id="status.3xx" href="#status.3xx">Redirection 3xx</a></h2>2385 <div id="rfc.iref. 55"></div>2512 <p id="rfc.section.7.3.6.p.2">The message body included with the response <em class="bcp14">MUST</em> be empty. Note that receivers still need to parse the response according to the algorithm defined in <a href="p1-messaging.html#message.body" title="Message Body">Section 3.3</a> of <a href="#Part1" id="rfc.xref.Part1.23"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[Part1]</cite></a>. 2513 </p> 2514 <h2 id="rfc.section.7.4"><a href="#rfc.section.7.4">7.4</a> <a id="status.3xx" href="#status.3xx">Redirection 3xx</a></h2> 2515 <div id="rfc.iref.69"></div> 2386 2516 <div id="rfc.iref.s.4"></div> 2387 <p id="rfc.section. 6.4.p.1">This class of status code indicates that further action needs to be taken by the user agent in order to fulfill the request.2517 <p id="rfc.section.7.4.p.1">This class of status code indicates that further action needs to be taken by the user agent in order to fulfill the request. 2388 2518 If the required action involves a subsequent HTTP request, it <em class="bcp14">MAY</em> be carried out by the user agent without interaction with the user if and only if the method used in the second request is 2389 known to be "safe", as defined in <a href="#safe.methods" title="Safe Methods">Section 4.2.1</a>.2390 </p> 2391 <p id="rfc.section. 6.4.p.2">There are several types of redirects: </p>2519 known to be "safe", as defined in <a href="#safe.methods" title="Safe Methods">Section 5.2.1</a>. 2520 </p> 2521 <p id="rfc.section.7.4.p.2">There are several types of redirects: </p> 2392 2522 <ol> 2393 2523 <li> … … 2412 2542 </li> 2413 2543 </ol> 2414 <div class="note" id="rfc.section. 6.4.p.3">2544 <div class="note" id="rfc.section.7.4.p.3"> 2415 2545 <p> <b>Note:</b> In HTTP/1.0, only the status codes <a href="#status.301" class="smpl">301 (Moved Permanently)</a> and <a href="#status.302" class="smpl">302 (Found)</a> were defined for the first type of redirect, and the second type did not exist at all (<a href="#RFC1945" id="rfc.xref.RFC1945.1"><cite title="Hypertext Transfer Protocol -- HTTP/1.0">[RFC1945]</cite></a>, <a href="http://tools.ietf.org/html/rfc1945#section-9.3">Section 9.3</a>). However it turned out that web forms using POST expected redirects to change the operation for the subsequent request to 2416 2546 retrieval (GET). To address this use case, HTTP/1.1 introduced the second type of redirect with the status code <a href="#status.303" class="smpl">303 (See Other)</a> (<a href="#RFC2068" id="rfc.xref.RFC2068.2"><cite title="Hypertext Transfer Protocol -- HTTP/1.1">[RFC2068]</cite></a>, <a href="http://tools.ietf.org/html/rfc2068#section-10.3.4">Section 10.3.4</a>). As user agents did not change their behavior to maintain backwards compatibility, the first revision of HTTP/1.1 added … … 2418 2548 </p> 2419 2549 </div> 2420 <p id="rfc.section. 6.4.p.4">A <a href="#header.location" class="smpl">Location</a> header field on a 3xx response indicates that a client <em class="bcp14">MAY</em> automatically redirect to the URI provided; see <a href="#header.location" id="rfc.xref.header.location.2" title="Location">Section 7.1.2</a>.2421 </p> 2422 <p id="rfc.section. 6.4.p.5">Note that for methods not known to be "safe", as defined in <a href="#safe.methods" title="Safe Methods">Section 4.2.1</a>, automatic redirection needs to done with care, since the redirect might change the conditions under which the request was2550 <p id="rfc.section.7.4.p.4">A <a href="#header.location" class="smpl">Location</a> header field on a 3xx response indicates that a client <em class="bcp14">MAY</em> automatically redirect to the URI provided; see <a href="#header.location" id="rfc.xref.header.location.2" title="Location">Section 8.1.2</a>. 2551 </p> 2552 <p id="rfc.section.7.4.p.5">Note that for methods not known to be "safe", as defined in <a href="#safe.methods" title="Safe Methods">Section 5.2.1</a>, automatic redirection needs to done with care, since the redirect might change the conditions under which the request was 2423 2553 issued. 2424 2554 </p> 2425 <p id="rfc.section. 6.4.p.6">Clients <em class="bcp14">SHOULD</em> detect and intervene in cyclical redirections (i.e., "infinite" redirection loops).2426 </p> 2427 <div class="note" id="rfc.section. 6.4.p.7">2555 <p id="rfc.section.7.4.p.6">Clients <em class="bcp14">SHOULD</em> detect and intervene in cyclical redirections (i.e., "infinite" redirection loops). 2556 </p> 2557 <div class="note" id="rfc.section.7.4.p.7"> 2428 2558 <p> <b>Note:</b> An earlier version of this specification recommended a maximum of five redirections (<a href="#RFC2068" id="rfc.xref.RFC2068.3"><cite title="Hypertext Transfer Protocol -- HTTP/1.1">[RFC2068]</cite></a>, <a href="http://tools.ietf.org/html/rfc2068#section-10.3">Section 10.3</a>). Content developers need to be aware that some clients might implement such a fixed limitation. 2429 2559 </p> 2430 2560 </div> 2431 <div id="rfc.iref. 56"></div>2432 <h3 id="rfc.section. 6.4.1"><a href="#rfc.section.6.4.1">6.4.1</a> <a id="status.300" href="#status.300">300 Multiple Choices</a></h3>2433 <p id="rfc.section. 6.4.1.p.1">The target resource has more than one representation, each with its own specific location, and reactive negotiation information2561 <div id="rfc.iref.70"></div> 2562 <h3 id="rfc.section.7.4.1"><a href="#rfc.section.7.4.1">7.4.1</a> <a id="status.300" href="#status.300">300 Multiple Choices</a></h3> 2563 <p id="rfc.section.7.4.1.p.1">The target resource has more than one representation, each with its own specific location, and reactive negotiation information 2434 2564 (<a href="#content.negotiation" title="Content Negotiation">Section 3.4</a>) is being provided so that the user (or user agent) can select a preferred representation by redirecting its request to that 2435 2565 location. 2436 2566 </p> 2437 <p id="rfc.section. 6.4.1.p.2">Unless it was a HEAD request, the response <em class="bcp14">SHOULD</em> include a representation containing a list of representation metadata and location(s) from which the user or user agent can2567 <p id="rfc.section.7.4.1.p.2">Unless it was a HEAD request, the response <em class="bcp14">SHOULD</em> include a representation containing a list of representation metadata and location(s) from which the user or user agent can 2438 2568 choose the one most appropriate. Depending upon the format and the capabilities of the user agent, selection of the most appropriate 2439 2569 choice <em class="bcp14">MAY</em> be performed automatically. However, this specification does not define any standard for such automatic selection. 2440 2570 </p> 2441 <p id="rfc.section. 6.4.1.p.3">If the server has a preferred choice of representation, it <em class="bcp14">SHOULD</em> include the specific URI for that representation in the <a href="#header.location" class="smpl">Location</a> field; user agents <em class="bcp14">MAY</em> use the Location field value for automatic redirection.2442 </p> 2443 <p id="rfc.section. 6.4.1.p.4">Caches <em class="bcp14">MAY</em> use a heuristic (see <a href="p6-cache.html#heuristic.freshness" title="Calculating Heuristic Freshness">Section 4.1.2</a> of <a href="#Part6" id="rfc.xref.Part6.12"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Caching">[Part6]</cite></a>) to determine freshness for 300 responses.2444 </p> 2445 <div id="rfc.iref. 56"></div>2446 <h3 id="rfc.section. 6.4.2"><a href="#rfc.section.6.4.2">6.4.2</a> <a id="status.301" href="#status.301">301 Moved Permanently</a></h3>2447 <p id="rfc.section. 6.4.2.p.1">The target resource has been assigned a new permanent URI and any future references to this resource <em class="bcp14">SHOULD</em> use one of the returned URIs. Clients with link editing capabilities ought to automatically re-link references to the effective2571 <p id="rfc.section.7.4.1.p.3">If the server has a preferred choice of representation, it <em class="bcp14">SHOULD</em> include the specific URI for that representation in the <a href="#header.location" class="smpl">Location</a> field; user agents <em class="bcp14">MAY</em> use the Location field value for automatic redirection. 2572 </p> 2573 <p id="rfc.section.7.4.1.p.4">Caches <em class="bcp14">MAY</em> use a heuristic (see <a href="p6-cache.html#heuristic.freshness" title="Calculating Heuristic Freshness">Section 4.1.2</a> of <a href="#Part6" id="rfc.xref.Part6.12"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Caching">[Part6]</cite></a>) to determine freshness for 300 responses. 2574 </p> 2575 <div id="rfc.iref.70"></div> 2576 <h3 id="rfc.section.7.4.2"><a href="#rfc.section.7.4.2">7.4.2</a> <a id="status.301" href="#status.301">301 Moved Permanently</a></h3> 2577 <p id="rfc.section.7.4.2.p.1">The target resource has been assigned a new permanent URI and any future references to this resource <em class="bcp14">SHOULD</em> use one of the returned URIs. Clients with link editing capabilities ought to automatically re-link references to the effective 2448 2578 request URI to one or more of the new references returned by the server, where possible. 2449 2579 </p> 2450 <p id="rfc.section. 6.4.2.p.2">Caches <em class="bcp14">MAY</em> use a heuristic (see <a href="p6-cache.html#heuristic.freshness" title="Calculating Heuristic Freshness">Section 4.1.2</a> of <a href="#Part6" id="rfc.xref.Part6.13"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Caching">[Part6]</cite></a>) to determine freshness for 301 responses.2451 </p> 2452 <p id="rfc.section. 6.4.2.p.3">The new permanent URI <em class="bcp14">SHOULD</em> be given by the <a href="#header.location" class="smpl">Location</a> field in the response. A response payload can contain a short hypertext note with a hyperlink to the new URI(s).2453 </p> 2454 <div class="note" id="rfc.section. 6.4.2.p.4">2580 <p id="rfc.section.7.4.2.p.2">Caches <em class="bcp14">MAY</em> use a heuristic (see <a href="p6-cache.html#heuristic.freshness" title="Calculating Heuristic Freshness">Section 4.1.2</a> of <a href="#Part6" id="rfc.xref.Part6.13"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Caching">[Part6]</cite></a>) to determine freshness for 301 responses. 2581 </p> 2582 <p id="rfc.section.7.4.2.p.3">The new permanent URI <em class="bcp14">SHOULD</em> be given by the <a href="#header.location" class="smpl">Location</a> field in the response. A response payload can contain a short hypertext note with a hyperlink to the new URI(s). 2583 </p> 2584 <div class="note" id="rfc.section.7.4.2.p.4"> 2455 2585 <p> <b>Note:</b> For historic reasons, user agents <em class="bcp14">MAY</em> change the request method from POST to GET for the subsequent request. If this behavior is undesired, status code <a href="#status.307" class="smpl">307 (Temporary Redirect)</a> can be used instead. 2456 2586 </p> 2457 2587 </div> 2458 <div id="rfc.iref. 56"></div>2459 <h3 id="rfc.section. 6.4.3"><a href="#rfc.section.6.4.3">6.4.3</a> <a id="status.302" href="#status.302">302 Found</a></h3>2460 <p id="rfc.section. 6.4.3.p.1">The target resource resides temporarily under a different URI. Since the redirection might be altered on occasion, the client <em class="bcp14">SHOULD</em> continue to use the effective request URI for future requests.2461 </p> 2462 <p id="rfc.section. 6.4.3.p.2">The temporary URI <em class="bcp14">SHOULD</em> be given by the <a href="#header.location" class="smpl">Location</a> field in the response. A response payload can contain a short hypertext note with a hyperlink to the new URI(s).2463 </p> 2464 <div class="note" id="rfc.section. 6.4.3.p.3">2588 <div id="rfc.iref.70"></div> 2589 <h3 id="rfc.section.7.4.3"><a href="#rfc.section.7.4.3">7.4.3</a> <a id="status.302" href="#status.302">302 Found</a></h3> 2590 <p id="rfc.section.7.4.3.p.1">The target resource resides temporarily under a different URI. Since the redirection might be altered on occasion, the client <em class="bcp14">SHOULD</em> continue to use the effective request URI for future requests. 2591 </p> 2592 <p id="rfc.section.7.4.3.p.2">The temporary URI <em class="bcp14">SHOULD</em> be given by the <a href="#header.location" class="smpl">Location</a> field in the response. A response payload can contain a short hypertext note with a hyperlink to the new URI(s). 2593 </p> 2594 <div class="note" id="rfc.section.7.4.3.p.3"> 2465 2595 <p> <b>Note:</b> For historic reasons, user agents <em class="bcp14">MAY</em> change the request method from POST to GET for the subsequent request. If this behavior is undesired, status code <a href="#status.307" class="smpl">307 (Temporary Redirect)</a> can be used instead. 2466 2596 </p> 2467 2597 </div> 2468 <div id="rfc.iref. 56"></div>2469 <h3 id="rfc.section. 6.4.4"><a href="#rfc.section.6.4.4">6.4.4</a> <a id="status.303" href="#status.303">303 See Other</a></h3>2470 <p id="rfc.section. 6.4.4.p.1">The 303 status code indicates that the server is redirecting the user agent to a different resource, as indicated by a URI2598 <div id="rfc.iref.70"></div> 2599 <h3 id="rfc.section.7.4.4"><a href="#rfc.section.7.4.4">7.4.4</a> <a id="status.303" href="#status.303">303 See Other</a></h3> 2600 <p id="rfc.section.7.4.4.p.1">The 303 status code indicates that the server is redirecting the user agent to a different resource, as indicated by a URI 2471 2601 in the <a href="#header.location" class="smpl">Location</a> header field, that is intended to provide an indirect response to the original request. In order to satisfy the original request, 2472 2602 a user agent <em class="bcp14">SHOULD</em> perform a retrieval request using the Location URI (a GET or HEAD request if using HTTP), which can itself be redirected further, … … 2474 2604 not considered equivalent to the effective request URI. 2475 2605 </p> 2476 <p id="rfc.section. 6.4.4.p.2">This status code is generally applicable to any HTTP method. It is primarily used to allow the output of a POST action to2606 <p id="rfc.section.7.4.4.p.2">This status code is generally applicable to any HTTP method. It is primarily used to allow the output of a POST action to 2477 2607 redirect the user agent to a selected resource, since doing so provides the information corresponding to the POST response 2478 2608 in a form that can be separately identified, bookmarked, and cached independent of the original request. 2479 2609 </p> 2480 <p id="rfc.section. 6.4.4.p.3">A 303 response to a GET request indicates that the requested resource does not have a representation of its own that can be2610 <p id="rfc.section.7.4.4.p.3">A 303 response to a GET request indicates that the requested resource does not have a representation of its own that can be 2481 2611 transferred by the server over HTTP. The <a href="#header.location" class="smpl">Location</a> URI indicates a resource that is descriptive of the target resource, such that the follow-on representation might be useful 2482 2612 to recipients without implying that it adequately represents the target resource. Note that answers to the questions of what … … 2484 2614 and thus entirely determined by the URI owner(s). 2485 2615 </p> 2486 <p id="rfc.section. 6.4.4.p.4">Except for responses to a HEAD request, the representation of a 303 response <em class="bcp14">SHOULD</em> contain a short hypertext note with a hyperlink to the <a href="#header.location" class="smpl">Location</a> URI.2487 </p> 2488 <div id="rfc.iref. 56"></div>2489 <h3 id="rfc.section. 6.4.5"><a href="#rfc.section.6.4.5">6.4.5</a> <a id="status.305" href="#status.305">305 Use Proxy</a></h3>2490 <p id="rfc.section. 6.4.5.p.1">The 305 status code was defined in a previous version of this specification (see <a href="#changes.from.rfc.2616" title="Changes from RFC 2616">Appendix C</a>), and is now deprecated.2491 </p> 2492 <div id="rfc.iref. 56"></div>2493 <h3 id="rfc.section. 6.4.6"><a href="#rfc.section.6.4.6">6.4.6</a> <a id="status.306" href="#status.306">306 (Unused)</a></h3>2494 <p id="rfc.section. 6.4.6.p.1">The 306 status code was used in a previous version of the specification, is no longer used, and the code is reserved.</p>2495 <div id="rfc.iref. 56"></div>2496 <h3 id="rfc.section. 6.4.7"><a href="#rfc.section.6.4.7">6.4.7</a> <a id="status.307" href="#status.307">307 Temporary Redirect</a></h3>2497 <p id="rfc.section. 6.4.7.p.1">The target resource resides temporarily under a different URI. Since the redirection can change over time, the client <em class="bcp14">SHOULD</em> continue to use the effective request URI for future requests.2498 </p> 2499 <p id="rfc.section. 6.4.7.p.2">The temporary URI <em class="bcp14">SHOULD</em> be given by the <a href="#header.location" class="smpl">Location</a> field in the response. A response payload can contain a short hypertext note with a hyperlink to the new URI(s).2500 </p> 2501 <div class="note" id="rfc.section. 6.4.7.p.3">2616 <p id="rfc.section.7.4.4.p.4">Except for responses to a HEAD request, the representation of a 303 response <em class="bcp14">SHOULD</em> contain a short hypertext note with a hyperlink to the <a href="#header.location" class="smpl">Location</a> URI. 2617 </p> 2618 <div id="rfc.iref.70"></div> 2619 <h3 id="rfc.section.7.4.5"><a href="#rfc.section.7.4.5">7.4.5</a> <a id="status.305" href="#status.305">305 Use Proxy</a></h3> 2620 <p id="rfc.section.7.4.5.p.1">The 305 status code was defined in a previous version of this specification (see <a href="#changes.from.rfc.2616" title="Changes from RFC 2616">Appendix C</a>), and is now deprecated. 2621 </p> 2622 <div id="rfc.iref.70"></div> 2623 <h3 id="rfc.section.7.4.6"><a href="#rfc.section.7.4.6">7.4.6</a> <a id="status.306" href="#status.306">306 (Unused)</a></h3> 2624 <p id="rfc.section.7.4.6.p.1">The 306 status code was used in a previous version of the specification, is no longer used, and the code is reserved.</p> 2625 <div id="rfc.iref.70"></div> 2626 <h3 id="rfc.section.7.4.7"><a href="#rfc.section.7.4.7">7.4.7</a> <a id="status.307" href="#status.307">307 Temporary Redirect</a></h3> 2627 <p id="rfc.section.7.4.7.p.1">The target resource resides temporarily under a different URI. Since the redirection can change over time, the client <em class="bcp14">SHOULD</em> continue to use the effective request URI for future requests. 2628 </p> 2629 <p id="rfc.section.7.4.7.p.2">The temporary URI <em class="bcp14">SHOULD</em> be given by the <a href="#header.location" class="smpl">Location</a> field in the response. A response payload can contain a short hypertext note with a hyperlink to the new URI(s). 2630 </p> 2631 <div class="note" id="rfc.section.7.4.7.p.3"> 2502 2632 <p> <b>Note:</b> This status code is similar to <a href="#status.302" class="smpl">302 (Found)</a>, except that it does not allow rewriting the request method from POST to GET. This specification defines no equivalent counterpart 2503 2633 for <a href="#status.301" class="smpl">301 (Moved … … 2505 2635 </p> 2506 2636 </div> 2507 <h2 id="rfc.section. 6.5"><a href="#rfc.section.6.5">6.5</a> <a id="status.4xx" href="#status.4xx">Client Error 4xx</a></h2>2508 <div id="rfc.iref. 56"></div>2637 <h2 id="rfc.section.7.5"><a href="#rfc.section.7.5">7.5</a> <a id="status.4xx" href="#status.4xx">Client Error 4xx</a></h2> 2638 <div id="rfc.iref.70"></div> 2509 2639 <div id="rfc.iref.s.5"></div> 2510 <p id="rfc.section. 6.5.p.1">The 4xx class of status code is intended for cases in which the client seems to have erred. Except when responding to a HEAD2640 <p id="rfc.section.7.5.p.1">The 4xx class of status code is intended for cases in which the client seems to have erred. Except when responding to a HEAD 2511 2641 request, the server <em class="bcp14">SHOULD</em> include a representation containing an explanation of the error situation, and whether it is a temporary or permanent condition. 2512 2642 These status codes are applicable to any request method. User agents <em class="bcp14">SHOULD</em> display any included representation to the user. 2513 2643 </p> 2514 <div id="rfc.iref. 57"></div>2515 <h3 id="rfc.section. 6.5.1"><a href="#rfc.section.6.5.1">6.5.1</a> <a id="status.400" href="#status.400">400 Bad Request</a></h3>2516 <p id="rfc.section. 6.5.1.p.1">The server cannot or will not process the request, due to a client error (e.g., malformed syntax).</p>2517 <div id="rfc.iref. 57"></div>2518 <h3 id="rfc.section. 6.5.2"><a href="#rfc.section.6.5.2">6.5.2</a> <a id="status.402" href="#status.402">402 Payment Required</a></h3>2519 <p id="rfc.section. 6.5.2.p.1">This code is reserved for future use.</p>2520 <div id="rfc.iref. 57"></div>2521 <h3 id="rfc.section. 6.5.3"><a href="#rfc.section.6.5.3">6.5.3</a> <a id="status.403" href="#status.403">403 Forbidden</a></h3>2522 <p id="rfc.section. 6.5.3.p.1">The server understood the request, but refuses to authorize it. Providing different user authentication credentials might2644 <div id="rfc.iref.71"></div> 2645 <h3 id="rfc.section.7.5.1"><a href="#rfc.section.7.5.1">7.5.1</a> <a id="status.400" href="#status.400">400 Bad Request</a></h3> 2646 <p id="rfc.section.7.5.1.p.1">The server cannot or will not process the request, due to a client error (e.g., malformed syntax).</p> 2647 <div id="rfc.iref.71"></div> 2648 <h3 id="rfc.section.7.5.2"><a href="#rfc.section.7.5.2">7.5.2</a> <a id="status.402" href="#status.402">402 Payment Required</a></h3> 2649 <p id="rfc.section.7.5.2.p.1">This code is reserved for future use.</p> 2650 <div id="rfc.iref.71"></div> 2651 <h3 id="rfc.section.7.5.3"><a href="#rfc.section.7.5.3">7.5.3</a> <a id="status.403" href="#status.403">403 Forbidden</a></h3> 2652 <p id="rfc.section.7.5.3.p.1">The server understood the request, but refuses to authorize it. Providing different user authentication credentials might 2523 2653 be successful, but any credentials that were provided in the request are insufficient. The request <em class="bcp14">SHOULD NOT</em> be repeated with the same credentials. 2524 2654 </p> 2525 <p id="rfc.section. 6.5.3.p.2">If the request method was not HEAD and the server wishes to make public why the request has not been fulfilled, it <em class="bcp14">SHOULD</em> describe the reason for the refusal in the representation. If the server does not wish to make this information available2655 <p id="rfc.section.7.5.3.p.2">If the request method was not HEAD and the server wishes to make public why the request has not been fulfilled, it <em class="bcp14">SHOULD</em> describe the reason for the refusal in the representation. If the server does not wish to make this information available 2526 2656 to the client, the status code <a href="#status.404" class="smpl">404 2527 2657 (Not Found)</a> <em class="bcp14">MAY</em> be used instead. 2528 2658 </p> 2529 <div id="rfc.iref. 57"></div>2530 <h3 id="rfc.section. 6.5.4"><a href="#rfc.section.6.5.4">6.5.4</a> <a id="status.404" href="#status.404">404 Not Found</a></h3>2531 <p id="rfc.section. 6.5.4.p.1">The server has not found anything matching the effective request URI. No indication is given of whether the condition is temporary2659 <div id="rfc.iref.71"></div> 2660 <h3 id="rfc.section.7.5.4"><a href="#rfc.section.7.5.4">7.5.4</a> <a id="status.404" href="#status.404">404 Not Found</a></h3> 2661 <p id="rfc.section.7.5.4.p.1">The server has not found anything matching the effective request URI. No indication is given of whether the condition is temporary 2532 2662 or permanent. The <a href="#status.410" class="smpl">410 (Gone)</a> status code <em class="bcp14">SHOULD</em> be used if the server knows, through some internally configurable mechanism, that an old resource is permanently unavailable 2533 2663 and has no forwarding address. This status code is commonly used when the server does not wish to reveal exactly why the request 2534 2664 has been refused, or when no other response is applicable. 2535 2665 </p> 2536 <div id="rfc.iref. 57"></div>2537 <h3 id="rfc.section. 6.5.5"><a href="#rfc.section.6.5.5">6.5.5</a> <a id="status.405" href="#status.405">405 Method Not Allowed</a></h3>2538 <p id="rfc.section. 6.5.5.p.1">The method specified in the request-line is not allowed for the target resource. The response <em class="bcp14">MUST</em> include an <a href="#header.allow" class="smpl">Allow</a> header field containing a list of valid methods for the requested resource.2539 </p> 2540 <div id="rfc.iref. 57"></div>2541 <h3 id="rfc.section. 6.5.6"><a href="#rfc.section.6.5.6">6.5.6</a> <a id="status.406" href="#status.406">406 Not Acceptable</a></h3>2542 <p id="rfc.section. 6.5.6.p.1">The resource identified by the request is only capable of generating response representations which have content characteristics2666 <div id="rfc.iref.71"></div> 2667 <h3 id="rfc.section.7.5.5"><a href="#rfc.section.7.5.5">7.5.5</a> <a id="status.405" href="#status.405">405 Method Not Allowed</a></h3> 2668 <p id="rfc.section.7.5.5.p.1">The method specified in the request-line is not allowed for the target resource. The response <em class="bcp14">MUST</em> include an <a href="#header.allow" class="smpl">Allow</a> header field containing a list of valid methods for the requested resource. 2669 </p> 2670 <div id="rfc.iref.71"></div> 2671 <h3 id="rfc.section.7.5.6"><a href="#rfc.section.7.5.6">7.5.6</a> <a id="status.406" href="#status.406">406 Not Acceptable</a></h3> 2672 <p id="rfc.section.7.5.6.p.1">The resource identified by the request is only capable of generating response representations which have content characteristics 2543 2673 not acceptable according to the <a href="#header.accept" class="smpl">Accept</a> and Accept-* header fields sent in the request. 2544 2674 </p> 2545 <p id="rfc.section. 6.5.6.p.2">Unless it was a HEAD request, the response <em class="bcp14">SHOULD</em> include a representation containing a list of available representation characteristics and location(s) from which the user2675 <p id="rfc.section.7.5.6.p.2">Unless it was a HEAD request, the response <em class="bcp14">SHOULD</em> include a representation containing a list of available representation characteristics and location(s) from which the user 2546 2676 or user agent can choose the one most appropriate. Depending upon the format and the capabilities of the user agent, selection 2547 2677 of the most appropriate choice <em class="bcp14">MAY</em> be performed automatically. However, this specification does not define any standard for such automatic selection. 2548 2678 </p> 2549 <div class="note" id="rfc.section. 6.5.6.p.3">2679 <div class="note" id="rfc.section.7.5.6.p.3"> 2550 2680 <p> <b>Note:</b> HTTP/1.1 servers are allowed to return responses which are not acceptable according to the accept header fields sent in the 2551 2681 request. In some cases, this might even be preferable to sending a 406 response. User agents are encouraged to inspect the … … 2553 2683 </p> 2554 2684 </div> 2555 <p id="rfc.section. 6.5.6.p.4">If the response could be unacceptable, a user agent <em class="bcp14">SHOULD</em> temporarily stop receipt of more data and query the user for a decision on further actions.2556 </p> 2557 <div id="rfc.iref. 57"></div>2558 <h3 id="rfc.section. 6.5.7"><a href="#rfc.section.6.5.7">6.5.7</a> <a id="status.408" href="#status.408">408 Request Timeout</a></h3>2559 <p id="rfc.section. 6.5.7.p.1">The client did not produce a request within the time that the server was prepared to wait. The client <em class="bcp14">MAY</em> repeat the request without modifications at any later time.2560 </p> 2561 <div id="rfc.iref. 57"></div>2562 <h3 id="rfc.section. 6.5.8"><a href="#rfc.section.6.5.8">6.5.8</a> <a id="status.409" href="#status.409">409 Conflict</a></h3>2563 <p id="rfc.section. 6.5.8.p.1">The request could not be completed due to a conflict with the current state of the resource. This code is only allowed in2685 <p id="rfc.section.7.5.6.p.4">If the response could be unacceptable, a user agent <em class="bcp14">SHOULD</em> temporarily stop receipt of more data and query the user for a decision on further actions. 2686 </p> 2687 <div id="rfc.iref.71"></div> 2688 <h3 id="rfc.section.7.5.7"><a href="#rfc.section.7.5.7">7.5.7</a> <a id="status.408" href="#status.408">408 Request Timeout</a></h3> 2689 <p id="rfc.section.7.5.7.p.1">The client did not produce a request within the time that the server was prepared to wait. The client <em class="bcp14">MAY</em> repeat the request without modifications at any later time. 2690 </p> 2691 <div id="rfc.iref.71"></div> 2692 <h3 id="rfc.section.7.5.8"><a href="#rfc.section.7.5.8">7.5.8</a> <a id="status.409" href="#status.409">409 Conflict</a></h3> 2693 <p id="rfc.section.7.5.8.p.1">The request could not be completed due to a conflict with the current state of the resource. This code is only allowed in 2564 2694 situations where it is expected that the user might be able to resolve the conflict and resubmit the request. The payload <em class="bcp14">SHOULD</em> include enough information for the user to recognize the source of the conflict. Ideally, the response representation would 2565 2695 include enough information for the user or user agent to fix the problem; however, that might not be possible and is not required. 2566 2696 </p> 2567 <p id="rfc.section. 6.5.8.p.2">Conflicts are most likely to occur in response to a PUT request. For example, if versioning were being used and the representation2697 <p id="rfc.section.7.5.8.p.2">Conflicts are most likely to occur in response to a PUT request. For example, if versioning were being used and the representation 2568 2698 being PUT included changes to a resource which conflict with those made by an earlier (third-party) request, the server might 2569 2699 use the 409 response to indicate that it can't complete the request. In this case, the response representation would likely 2570 2700 contain a list of the differences between the two versions. 2571 2701 </p> 2572 <div id="rfc.iref. 57"></div>2573 <h3 id="rfc.section. 6.5.9"><a href="#rfc.section.6.5.9">6.5.9</a> <a id="status.410" href="#status.410">410 Gone</a></h3>2574 <p id="rfc.section. 6.5.9.p.1">The target resource is no longer available at the server and no forwarding address is known. This condition is expected to2702 <div id="rfc.iref.71"></div> 2703 <h3 id="rfc.section.7.5.9"><a href="#rfc.section.7.5.9">7.5.9</a> <a id="status.410" href="#status.410">410 Gone</a></h3> 2704 <p id="rfc.section.7.5.9.p.1">The target resource is no longer available at the server and no forwarding address is known. This condition is expected to 2575 2705 be considered permanent. Clients with link editing capabilities <em class="bcp14">SHOULD</em> delete references to the effective request URI after user approval. If the server does not know, or has no facility to determine, 2576 2706 whether or not the condition is permanent, the status code <a href="#status.404" class="smpl">404 (Not Found)</a> <em class="bcp14">SHOULD</em> be used instead. 2577 2707 </p> 2578 <p id="rfc.section. 6.5.9.p.2">The 410 response is primarily intended to assist the task of web maintenance by notifying the recipient that the resource2708 <p id="rfc.section.7.5.9.p.2">The 410 response is primarily intended to assist the task of web maintenance by notifying the recipient that the resource 2579 2709 is intentionally unavailable and that the server owners desire that remote links to that resource be removed. Such an event 2580 2710 is common for limited-time, promotional services and for resources belonging to individuals no longer working at the server's … … 2582 2712 — that is left to the discretion of the server owner. 2583 2713 </p> 2584 <p id="rfc.section. 6.5.9.p.3">Caches <em class="bcp14">MAY</em> use a heuristic (see <a href="p6-cache.html#heuristic.freshness" title="Calculating Heuristic Freshness">Section 4.1.2</a> of <a href="#Part6" id="rfc.xref.Part6.14"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Caching">[Part6]</cite></a>) to determine freshness for 410 responses.2585 </p> 2586 <div id="rfc.iref. 57"></div>2587 <h3 id="rfc.section. 6.5.10"><a href="#rfc.section.6.5.10">6.5.10</a> <a id="status.411" href="#status.411">411 Length Required</a></h3>2588 <p id="rfc.section. 6.5.10.p.1">The server refuses to accept the request without a defined <a href="p1-messaging.html#header.content-length" class="smpl">Content-Length</a>. The client <em class="bcp14">MAY</em> repeat the request if it adds a valid Content-Length header field containing the length of the message body in the request2714 <p id="rfc.section.7.5.9.p.3">Caches <em class="bcp14">MAY</em> use a heuristic (see <a href="p6-cache.html#heuristic.freshness" title="Calculating Heuristic Freshness">Section 4.1.2</a> of <a href="#Part6" id="rfc.xref.Part6.14"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Caching">[Part6]</cite></a>) to determine freshness for 410 responses. 2715 </p> 2716 <div id="rfc.iref.71"></div> 2717 <h3 id="rfc.section.7.5.10"><a href="#rfc.section.7.5.10">7.5.10</a> <a id="status.411" href="#status.411">411 Length Required</a></h3> 2718 <p id="rfc.section.7.5.10.p.1">The server refuses to accept the request without a defined <a href="p1-messaging.html#header.content-length" class="smpl">Content-Length</a>. The client <em class="bcp14">MAY</em> repeat the request if it adds a valid Content-Length header field containing the length of the message body in the request 2589 2719 message. 2590 2720 </p> 2591 <div id="rfc.iref. 57"></div>2592 <h3 id="rfc.section. 6.5.11"><a href="#rfc.section.6.5.11">6.5.11</a> <a id="status.413" href="#status.413">413 Request Representation Too Large</a></h3>2593 <p id="rfc.section. 6.5.11.p.1">The server is refusing to process a request because the request representation is larger than the server is willing or able2721 <div id="rfc.iref.71"></div> 2722 <h3 id="rfc.section.7.5.11"><a href="#rfc.section.7.5.11">7.5.11</a> <a id="status.413" href="#status.413">413 Request Representation Too Large</a></h3> 2723 <p id="rfc.section.7.5.11.p.1">The server is refusing to process a request because the request representation is larger than the server is willing or able 2594 2724 to process. The server <em class="bcp14">MAY</em> close the connection to prevent the client from continuing the request. 2595 2725 </p> 2596 <p id="rfc.section. 6.5.11.p.2">If the condition is temporary, the server <em class="bcp14">SHOULD</em> include a <a href="#header.retry-after" class="smpl">Retry-After</a> header field to indicate that it is temporary and after what time the client <em class="bcp14">MAY</em> try again.2597 </p> 2598 <div id="rfc.iref. 57"></div>2599 <h3 id="rfc.section. 6.5.12"><a href="#rfc.section.6.5.12">6.5.12</a> <a id="status.414" href="#status.414">414 URI Too Long</a></h3>2600 <p id="rfc.section. 6.5.12.p.1">The server is refusing to service the request because the effective request URI is longer than the server is willing to interpret.2726 <p id="rfc.section.7.5.11.p.2">If the condition is temporary, the server <em class="bcp14">SHOULD</em> include a <a href="#header.retry-after" class="smpl">Retry-After</a> header field to indicate that it is temporary and after what time the client <em class="bcp14">MAY</em> try again. 2727 </p> 2728 <div id="rfc.iref.71"></div> 2729 <h3 id="rfc.section.7.5.12"><a href="#rfc.section.7.5.12">7.5.12</a> <a id="status.414" href="#status.414">414 URI Too Long</a></h3> 2730 <p id="rfc.section.7.5.12.p.1">The server is refusing to service the request because the effective request URI is longer than the server is willing to interpret. 2601 2731 This rare condition is only likely to occur when a client has improperly converted a POST request to a GET request with long 2602 2732 query information, when the client has descended into a URI "black hole" of redirection (e.g., a redirected URI prefix that … … 2604 2734 in some servers using fixed-length buffers for reading or manipulating the request-target. 2605 2735 </p> 2606 <div id="rfc.iref. 57"></div>2607 <h3 id="rfc.section. 6.5.13"><a href="#rfc.section.6.5.13">6.5.13</a> <a id="status.415" href="#status.415">415 Unsupported Media Type</a></h3>2608 <p id="rfc.section. 6.5.13.p.1">The server is refusing to service the request because the request payload is in a format not supported by this request method2736 <div id="rfc.iref.71"></div> 2737 <h3 id="rfc.section.7.5.13"><a href="#rfc.section.7.5.13">7.5.13</a> <a id="status.415" href="#status.415">415 Unsupported Media Type</a></h3> 2738 <p id="rfc.section.7.5.13.p.1">The server is refusing to service the request because the request payload is in a format not supported by this request method 2609 2739 on the target resource. 2610 2740 </p> 2611 <div id="rfc.iref. 57"></div>2612 <h3 id="rfc.section. 6.5.14"><a href="#rfc.section.6.5.14">6.5.14</a> <a id="status.417" href="#status.417">417 Expectation Failed</a></h3>2613 <p id="rfc.section. 6.5.14.p.1">The expectation given in an <a href="#header.expect" class="smpl">Expect</a> header field (see <a href="#header.expect" id="rfc.xref.header.expect.2" title="Expect">Section 5.1.2</a>) could not be met by this server, or, if the server is a proxy, the server has unambiguous evidence that the request could2741 <div id="rfc.iref.71"></div> 2742 <h3 id="rfc.section.7.5.14"><a href="#rfc.section.7.5.14">7.5.14</a> <a id="status.417" href="#status.417">417 Expectation Failed</a></h3> 2743 <p id="rfc.section.7.5.14.p.1">The expectation given in an <a href="#header.expect" class="smpl">Expect</a> header field (see <a href="#header.expect" id="rfc.xref.header.expect.2" title="Expect">Section 6.1.2</a>) could not be met by this server, or, if the server is a proxy, the server has unambiguous evidence that the request could 2614 2744 not be met by the next-hop server. 2615 2745 </p> 2616 <div id="rfc.iref. 57"></div>2617 <h3 id="rfc.section. 6.5.15"><a href="#rfc.section.6.5.15">6.5.15</a> <a id="status.426" href="#status.426">426 Upgrade Required</a></h3>2618 <p id="rfc.section. 6.5.15.p.1">The request can not be completed without a prior protocol upgrade. This response <em class="bcp14">MUST</em> include an <a href="p1-messaging.html#header.upgrade" class="smpl">Upgrade</a> header field (<a href="p1-messaging.html#header.upgrade" title="Upgrade">Section 6.3</a> of <a href="#Part1" id="rfc.xref.Part1.21"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[Part1]</cite></a>) specifying the required protocols.2619 </p> 2620 <div id="rfc.figure.u. 33"></div>2746 <div id="rfc.iref.71"></div> 2747 <h3 id="rfc.section.7.5.15"><a href="#rfc.section.7.5.15">7.5.15</a> <a id="status.426" href="#status.426">426 Upgrade Required</a></h3> 2748 <p id="rfc.section.7.5.15.p.1">The request can not be completed without a prior protocol upgrade. This response <em class="bcp14">MUST</em> include an <a href="p1-messaging.html#header.upgrade" class="smpl">Upgrade</a> header field (<a href="p1-messaging.html#header.upgrade" title="Upgrade">Section 6.3</a> of <a href="#Part1" id="rfc.xref.Part1.24"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[Part1]</cite></a>) specifying the required protocols. 2749 </p> 2750 <div id="rfc.figure.u.41"></div> 2621 2751 <p>Example:</p> <pre class="text">HTTP/1.1 426 Upgrade Required 2622 2752 Upgrade: HTTP/3.0 … … 2626 2756 2627 2757 <span id="s426body">This service requires use of the HTTP/3.0 protocol. 2628 </span></pre><p id="rfc.section. 6.5.15.p.3">The server <em class="bcp14">SHOULD</em> include a message body in the 426 response which indicates in human readable form the reason for the error and describes any2758 </span></pre><p id="rfc.section.7.5.15.p.3">The server <em class="bcp14">SHOULD</em> include a message body in the 426 response which indicates in human readable form the reason for the error and describes any 2629 2759 alternative courses which might be available to the user. 2630 2760 </p> 2631 <h2 id="rfc.section. 6.6"><a href="#rfc.section.6.6">6.6</a> <a id="status.5xx" href="#status.5xx">Server Error 5xx</a></h2>2632 <div id="rfc.iref. 57"></div>2761 <h2 id="rfc.section.7.6"><a href="#rfc.section.7.6">7.6</a> <a id="status.5xx" href="#status.5xx">Server Error 5xx</a></h2> 2762 <div id="rfc.iref.71"></div> 2633 2763 <div id="rfc.iref.s.6"></div> 2634 <p id="rfc.section. 6.6.p.1">Response status codes beginning with the digit "5" indicate cases in which the server is aware that it has erred or is incapable2764 <p id="rfc.section.7.6.p.1">Response status codes beginning with the digit "5" indicate cases in which the server is aware that it has erred or is incapable 2635 2765 of performing the request. Except when responding to a HEAD request, the server <em class="bcp14">SHOULD</em> include a representation containing an explanation of the error situation, and whether it is a temporary or permanent condition. 2636 2766 User agents <em class="bcp14">SHOULD</em> display any included representation to the user. These response codes are applicable to any request method. 2637 2767 </p> 2638 <div id="rfc.iref. 58"></div>2639 <h3 id="rfc.section. 6.6.1"><a href="#rfc.section.6.6.1">6.6.1</a> <a id="status.500" href="#status.500">500 Internal Server Error</a></h3>2640 <p id="rfc.section. 6.6.1.p.1">The server encountered an unexpected condition which prevented it from fulfilling the request.</p>2641 <div id="rfc.iref. 58"></div>2642 <h3 id="rfc.section. 6.6.2"><a href="#rfc.section.6.6.2">6.6.2</a> <a id="status.501" href="#status.501">501 Not Implemented</a></h3>2643 <p id="rfc.section. 6.6.2.p.1">The server does not support the functionality required to fulfill the request. This is the appropriate response when the server2768 <div id="rfc.iref.72"></div> 2769 <h3 id="rfc.section.7.6.1"><a href="#rfc.section.7.6.1">7.6.1</a> <a id="status.500" href="#status.500">500 Internal Server Error</a></h3> 2770 <p id="rfc.section.7.6.1.p.1">The server encountered an unexpected condition which prevented it from fulfilling the request.</p> 2771 <div id="rfc.iref.72"></div> 2772 <h3 id="rfc.section.7.6.2"><a href="#rfc.section.7.6.2">7.6.2</a> <a id="status.501" href="#status.501">501 Not Implemented</a></h3> 2773 <p id="rfc.section.7.6.2.p.1">The server does not support the functionality required to fulfill the request. This is the appropriate response when the server 2644 2774 does not recognize the request method and is not capable of supporting it for any resource. 2645 2775 </p> 2646 <div id="rfc.iref. 58"></div>2647 <h3 id="rfc.section. 6.6.3"><a href="#rfc.section.6.6.3">6.6.3</a> <a id="status.502" href="#status.502">502 Bad Gateway</a></h3>2648 <p id="rfc.section. 6.6.3.p.1">The server, while acting as a gateway or proxy, received an invalid response from the upstream server it accessed in attempting2776 <div id="rfc.iref.72"></div> 2777 <h3 id="rfc.section.7.6.3"><a href="#rfc.section.7.6.3">7.6.3</a> <a id="status.502" href="#status.502">502 Bad Gateway</a></h3> 2778 <p id="rfc.section.7.6.3.p.1">The server, while acting as a gateway or proxy, received an invalid response from the upstream server it accessed in attempting 2649 2779 to fulfill the request. 2650 2780 </p> 2651 <div id="rfc.iref. 58"></div>2652 <h3 id="rfc.section. 6.6.4"><a href="#rfc.section.6.6.4">6.6.4</a> <a id="status.503" href="#status.503">503 Service Unavailable</a></h3>2653 <p id="rfc.section. 6.6.4.p.1">The server is currently unable to handle the request due to a temporary overloading or maintenance of the server.</p>2654 <p id="rfc.section. 6.6.4.p.2">The implication is that this is a temporary condition which will be alleviated after some delay. If known, the length of the2655 delay <em class="bcp14">MAY</em> be indicated in a <a href="#header.retry-after" class="smpl">Retry-After</a> header field (<a href="#header.retry-after" id="rfc.xref.header.retry-after.1" title="Retry-After">Section 7.1.3</a>). If no Retry-After is given, the client <em class="bcp14">SHOULD</em> handle the response as it would for a <a href="#status.500" class="smpl">500 (Internal2781 <div id="rfc.iref.72"></div> 2782 <h3 id="rfc.section.7.6.4"><a href="#rfc.section.7.6.4">7.6.4</a> <a id="status.503" href="#status.503">503 Service Unavailable</a></h3> 2783 <p id="rfc.section.7.6.4.p.1">The server is currently unable to handle the request due to a temporary overloading or maintenance of the server.</p> 2784 <p id="rfc.section.7.6.4.p.2">The implication is that this is a temporary condition which will be alleviated after some delay. If known, the length of the 2785 delay <em class="bcp14">MAY</em> be indicated in a <a href="#header.retry-after" class="smpl">Retry-After</a> header field (<a href="#header.retry-after" id="rfc.xref.header.retry-after.1" title="Retry-After">Section 8.1.3</a>). If no Retry-After is given, the client <em class="bcp14">SHOULD</em> handle the response as it would for a <a href="#status.500" class="smpl">500 (Internal 2656 2786 Server Error)</a> response. 2657 2787 </p> 2658 <div class="note" id="rfc.section. 6.6.4.p.3">2788 <div class="note" id="rfc.section.7.6.4.p.3"> 2659 2789 <p> <b>Note:</b> The existence of the 503 status code does not imply that a server has to use it when becoming overloaded. Some servers might 2660 2790 wish to simply refuse the connection. 2661 2791 </p> 2662 2792 </div> 2663 <div id="rfc.iref. 58"></div>2664 <h3 id="rfc.section. 6.6.5"><a href="#rfc.section.6.6.5">6.6.5</a> <a id="status.504" href="#status.504">504 Gateway Timeout</a></h3>2665 <p id="rfc.section. 6.6.5.p.1">The server, while acting as a gateway or proxy, did not receive a timely response from the upstream server specified by the2793 <div id="rfc.iref.72"></div> 2794 <h3 id="rfc.section.7.6.5"><a href="#rfc.section.7.6.5">7.6.5</a> <a id="status.504" href="#status.504">504 Gateway Timeout</a></h3> 2795 <p id="rfc.section.7.6.5.p.1">The server, while acting as a gateway or proxy, did not receive a timely response from the upstream server specified by the 2666 2796 URI (e.g., HTTP, FTP, LDAP) or some other auxiliary server (e.g., DNS) it needed to access in attempting to complete the request. 2667 2797 </p> 2668 <div class="note" id="rfc.section. 6.6.5.p.2">2798 <div class="note" id="rfc.section.7.6.5.p.2"> 2669 2799 <p> <b>Note</b> to implementers: some deployed proxies are known to return <a href="#status.400" class="smpl">400 (Bad Request)</a> or <a href="#status.500" class="smpl">500 (Internal Server 2670 2800 Error)</a> when DNS lookups time out. 2671 2801 </p> 2672 2802 </div> 2673 <div id="rfc.iref. 58"></div>2674 <h3 id="rfc.section. 6.6.6"><a href="#rfc.section.6.6.6">6.6.6</a> <a id="status.505" href="#status.505">505 HTTP Version Not Supported</a></h3>2675 <p id="rfc.section. 6.6.6.p.1">The server does not support, or refuses to support, the protocol version that was used in the request message. The server2803 <div id="rfc.iref.72"></div> 2804 <h3 id="rfc.section.7.6.6"><a href="#rfc.section.7.6.6">7.6.6</a> <a id="status.505" href="#status.505">505 HTTP Version Not Supported</a></h3> 2805 <p id="rfc.section.7.6.6.p.1">The server does not support, or refuses to support, the protocol version that was used in the request message. The server 2676 2806 is indicating that it is unable or unwilling to complete the request using the same major version as the client, as described 2677 in <a href="p1-messaging.html#http.version" title="Protocol Versioning">Section 2.6</a> of <a href="#Part1" id="rfc.xref.Part1.2 2"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[Part1]</cite></a>, other than with this error message. The response <em class="bcp14">SHOULD</em> contain a representation describing why that version is not supported and what other protocols are supported by that server.2678 </p> 2679 <h1 id="rfc.section. 7"><a href="#rfc.section.7">7.</a> <a id="response.header.fields" href="#response.header.fields">Response Header Fields</a></h1>2680 <p id="rfc.section. 7.p.1">The response header fields allow the server to pass additional information about the response which cannot be placed in the2681 status-line. These header fields give information about the server and about further access to the target resource (<a href="p1-messaging.html#effective.request.uri" title="Effective Request URI">Section 5.5</a> of <a href="#Part1" id="rfc.xref.Part1.2 3"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[Part1]</cite></a>).2682 </p> 2683 <h2 id="rfc.section. 7.1"><a href="#rfc.section.7.1">7.1</a> <a id="response.control.data" href="#response.control.data">Control Data</a></h2>2684 <p id="rfc.section. 7.1.p.1">Response header fields can supply control data that supplements the status code or instructs the client where to go next.</p>2807 in <a href="p1-messaging.html#http.version" title="Protocol Versioning">Section 2.6</a> of <a href="#Part1" id="rfc.xref.Part1.25"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[Part1]</cite></a>, other than with this error message. The response <em class="bcp14">SHOULD</em> contain a representation describing why that version is not supported and what other protocols are supported by that server. 2808 </p> 2809 <h1 id="rfc.section.8"><a href="#rfc.section.8">8.</a> <a id="response.header.fields" href="#response.header.fields">Response Header Fields</a></h1> 2810 <p id="rfc.section.8.p.1">The response header fields allow the server to pass additional information about the response which cannot be placed in the 2811 status-line. These header fields give information about the server and about further access to the target resource (<a href="p1-messaging.html#effective.request.uri" title="Effective Request URI">Section 5.5</a> of <a href="#Part1" id="rfc.xref.Part1.26"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[Part1]</cite></a>). 2812 </p> 2813 <h2 id="rfc.section.8.1"><a href="#rfc.section.8.1">8.1</a> <a id="response.control.data" href="#response.control.data">Control Data</a></h2> 2814 <p id="rfc.section.8.1.p.1">Response header fields can supply control data that supplements the status code or instructs the client where to go next.</p> 2685 2815 <div id="rfc.table.u.10"> 2686 2816 <table class="tt full left" cellpadding="3" cellspacing="0"> … … 2698 2828 <tr> 2699 2829 <td class="left">Date</td> 2700 <td class="left"><a href="#header.date" id="rfc.xref.header.date.2" title="Date">Section 7.1.1</a></td>2830 <td class="left"><a href="#header.date" id="rfc.xref.header.date.2" title="Date">Section 8.1.1.2</a></td> 2701 2831 </tr> 2702 2832 <tr> 2703 2833 <td class="left">Location</td> 2704 <td class="left"><a href="#header.location" id="rfc.xref.header.location.3" title="Location">Section 7.1.2</a></td>2834 <td class="left"><a href="#header.location" id="rfc.xref.header.location.3" title="Location">Section 8.1.2</a></td> 2705 2835 </tr> 2706 2836 <tr> 2707 2837 <td class="left">Retry-After</td> 2708 <td class="left"><a href="#header.retry-after" id="rfc.xref.header.retry-after.2" title="Retry-After">Section 7.1.3</a></td>2838 <td class="left"><a href="#header.retry-after" id="rfc.xref.header.retry-after.2" title="Retry-After">Section 8.1.3</a></td> 2709 2839 </tr> 2710 2840 </tbody> 2711 2841 </table> 2712 2842 </div> 2713 <div id="rfc.iref.d.2"></div> 2714 <h3 id="rfc.section.7.1.1"><a href="#rfc.section.7.1.1">7.1.1</a> <a id="header.date" href="#header.date">Date</a></h3> 2715 <p id="rfc.section.7.1.1.p.1">The "Date" header field represents the date and time at which the message was originated, having the same semantics as the 2716 Origination Date Field (orig-date) defined in <a href="http://tools.ietf.org/html/rfc5322#section-3.6.1">Section 3.6.1</a> of <a href="#RFC5322" id="rfc.xref.RFC5322.3"><cite title="Internet Message Format">[RFC5322]</cite></a>. The field value is an HTTP-date, as defined in <a href="#http.date" title="Date/Time Formats">Section 8.1</a>; it <em class="bcp14">MUST</em> be sent in rfc1123-date format. 2717 </p> 2718 <div id="rfc.figure.u.34"></div><pre class="inline"><span id="rfc.iref.g.27"></span> <a href="#header.date" class="smpl">Date</a> = <a href="#http.date" class="smpl">HTTP-date</a> 2719 </pre><p id="rfc.section.7.1.1.p.3">An example is</p> 2720 <div id="rfc.figure.u.35"></div><pre class="text"> Date: Tue, 15 Nov 1994 08:12:31 GMT 2721 </pre><p id="rfc.section.7.1.1.p.5">Origin servers <em class="bcp14">MUST</em> include a Date header field in all responses, except in these cases: 2722 </p> 2723 <ol> 2724 <li>If the response status code is <a href="#status.100" class="smpl">100 (Continue)</a> or <a href="#status.101" class="smpl">101 (Switching Protocols)</a>, the response <em class="bcp14">MAY</em> include a Date header field, at the server's option. 2725 </li> 2726 <li>If the response status code conveys a server error, e.g., <a href="#status.500" class="smpl">500 2727 (Internal Server Error)</a> or <a href="#status.503" class="smpl">503 (Service Unavailable)</a>, and it is inconvenient or impossible to generate a valid Date. 2728 </li> 2729 <li>If the server does not have a clock that can provide a reasonable approximation of the current time, its responses <em class="bcp14">MUST NOT</em> include a Date header field. 2730 </li> 2731 </ol> 2732 <p id="rfc.section.7.1.1.p.6">A received message that does not have a Date header field <em class="bcp14">MUST</em> be assigned one by the recipient if the message will be cached by that recipient. 2733 </p> 2734 <p id="rfc.section.7.1.1.p.7">Clients can use the Date header field as well; in order to keep request messages small, they are advised not to include it 2735 when it doesn't convey any useful information (as is usually the case for requests that do not contain a payload). 2736 </p> 2737 <p id="rfc.section.7.1.1.p.8">The HTTP-date sent in a Date header field <em class="bcp14">SHOULD NOT</em> represent a date and time subsequent to the generation of the message. It <em class="bcp14">SHOULD</em> represent the best available approximation of the date and time of message generation, unless the implementation has no means 2738 of generating a reasonably accurate date and time. In theory, the date ought to represent the moment just before the payload 2739 is generated. In practice, the date can be generated at any time during the message origination without affecting its semantic 2740 value. 2741 </p> 2742 <div id="rfc.iref.l.1"></div> 2743 <h3 id="rfc.section.7.1.2"><a href="#rfc.section.7.1.2">7.1.2</a> <a id="header.location" href="#header.location">Location</a></h3> 2744 <p id="rfc.section.7.1.2.p.1">The "Location" header field <em class="bcp14">MAY</em> be sent in responses to refer to a specific resource in accordance with the semantics of the status code. 2745 </p> 2746 <div id="rfc.figure.u.36"></div><pre class="inline"><span id="rfc.iref.g.28"></span> <a href="#header.location" class="smpl">Location</a> = <a href="#imported.abnf" class="smpl">URI-reference</a> 2747 </pre><p id="rfc.section.7.1.2.p.3">For <a href="#status.201" class="smpl">201 (Created)</a> responses, the Location is the URI of the new resource which was created by the request. For <a href="#status.3xx" class="smpl">3xx (Redirection)</a> responses, the location <em class="bcp14">SHOULD</em> indicate the server's preferred URI for automatic redirection to the resource. 2748 </p> 2749 <p id="rfc.section.7.1.2.p.4">The field value consists of a single URI-reference. When it has the form of a relative reference (<a href="#RFC3986" id="rfc.xref.RFC3986.1"><cite title="Uniform Resource Identifier (URI): Generic Syntax">[RFC3986]</cite></a>, <a href="http://tools.ietf.org/html/rfc3986#section-4.2">Section 4.2</a>), the final value is computed by resolving it against the effective request URI (<a href="#RFC3986" id="rfc.xref.RFC3986.2"><cite title="Uniform Resource Identifier (URI): Generic Syntax">[RFC3986]</cite></a>, <a href="http://tools.ietf.org/html/rfc3986#section-5">Section 5</a>). If the original URI, as navigated to by the user agent, did contain a fragment identifier, and the final value does not, 2750 then the original URI's fragment identifier is added to the final value. 2751 </p> 2752 <div id="rfc.figure.u.37"></div> 2753 <p>For example, the original URI "http://www.example.org/~tim", combined with a field value given as:</p> <pre class="text"> Location: /pub/WWW/People.html#tim 2754 </pre> <p>would result in a final value of "http://www.example.org/pub/WWW/People.html#tim"</p> 2755 <div id="rfc.figure.u.38"></div> 2756 <p>An original URI "http://www.example.org/index.html#larry", combined with a field value given as:</p> <pre class="text"> Location: http://www.example.net/index.html 2757 </pre> <p>would result in a final value of "http://www.example.net/index.html#larry", preserving the original fragment identifier.</p> 2758 <div class="note" id="rfc.section.7.1.2.p.7"> 2759 <p> <b>Note:</b> Some recipients attempt to recover from Location fields that are not valid URI references. This specification does not mandate 2760 or define such processing, but does allow it. 2761 </p> 2762 </div> 2763 <p id="rfc.section.7.1.2.p.8">There are circumstances in which a fragment identifier in a Location URI would not be appropriate. For instance, when it appears 2764 in a <a href="#status.201" class="smpl">201 2765 (Created)</a> response, where the Location header field specifies the URI for the entire created resource. 2766 </p> 2767 <div class="note" id="rfc.section.7.1.2.p.9"> 2768 <p> <b>Note:</b> The <a href="#header.content-location" class="smpl">Content-Location</a> header field (<a href="#header.content-location" id="rfc.xref.header.content-location.3" title="Content-Location">Section 3.1.4</a>) differs from Location in that the Content-Location identifies the most specific resource corresponding to the enclosed representation. 2769 It is therefore possible for a response to contain header fields for both Location and Content-Location. 2770 </p> 2771 </div> 2772 <div id="rfc.iref.r.3"></div> 2773 <h3 id="rfc.section.7.1.3"><a href="#rfc.section.7.1.3">7.1.3</a> <a id="header.retry-after" href="#header.retry-after">Retry-After</a></h3> 2774 <p id="rfc.section.7.1.3.p.1">The header "Retry-After" field can be used with a <a href="#status.503" class="smpl">503 (Service 2775 Unavailable)</a> response to indicate how long the service is expected to be unavailable to the requesting client. This field <em class="bcp14">MAY</em> also be used with any <a href="#status.3xx" class="smpl">3xx (Redirection)</a> response to indicate the minimum time the user-agent is asked to wait before issuing the redirected request. 2776 </p> 2777 <p id="rfc.section.7.1.3.p.2">The value of this field can be either an HTTP-date or an integer number of seconds (in decimal) after the time of the response.</p> 2778 <div id="rfc.figure.u.39"></div><pre class="inline"><span id="rfc.iref.g.29"></span> <a href="#header.retry-after" class="smpl">Retry-After</a> = <a href="#http.date" class="smpl">HTTP-date</a> / <a href="#rule.delta-seconds" class="smpl">delta-seconds</a> 2779 </pre><div id="rule.delta-seconds"> 2780 <p id="rfc.section.7.1.3.p.4"> Time spans are non-negative decimal integers, representing time in seconds.</p> 2781 </div> 2782 <div id="rfc.figure.u.40"></div><pre class="inline"><span id="rfc.iref.g.30"></span> <a href="#rule.delta-seconds" class="smpl">delta-seconds</a> = 1*<a href="#imported.abnf" class="smpl">DIGIT</a> 2783 </pre><p id="rfc.section.7.1.3.p.6">Two examples of its use are</p> 2784 <div id="rfc.figure.u.41"></div><pre class="text"> Retry-After: Fri, 31 Dec 1999 23:59:59 GMT 2785 Retry-After: 120 2786 </pre><p id="rfc.section.7.1.3.p.8">In the latter example, the delay is 2 minutes.</p> 2787 <h2 id="rfc.section.7.2"><a href="#rfc.section.7.2">7.2</a> <a id="selected.representation" href="#selected.representation">Selected Representation Header Fields</a></h2> 2788 <p id="rfc.section.7.2.p.1"><span id="rfc.iref.s.7"></span> We use the term "<dfn>selected representation</dfn>" to refer to the the current representation of a target resource that would have been selected in a successful response if 2789 the same request had used the method GET and excluded any conditional request header fields. 2790 </p> 2791 <p id="rfc.section.7.2.p.2">Additional header fields define metadata about the selected representation, which might differ from the representation included 2792 in the message for responses to some state-changing methods. The following header fields are defined as selected representation 2793 metadata: 2794 </p> 2795 <div id="rfc.table.u.11"> 2796 <table class="tt full left" cellpadding="3" cellspacing="0"> 2797 <thead> 2798 <tr> 2799 <th>Header Field Name</th> 2800 <th>Defined in...</th> 2801 </tr> 2802 </thead> 2803 <tbody> 2804 <tr> 2805 <td class="left">ETag</td> 2806 <td class="left"><a href="p4-conditional.html#header.etag" title="ETag">Section 2.3</a> of <a href="#Part4" id="rfc.xref.Part4.12"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Conditional Requests">[Part4]</cite></a></td> 2807 </tr> 2808 <tr> 2809 <td class="left">Last-Modified</td> 2810 <td class="left"><a href="p4-conditional.html#header.last-modified" title="Last-Modified">Section 2.2</a> of <a href="#Part4" id="rfc.xref.Part4.13"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Conditional Requests">[Part4]</cite></a></td> 2811 </tr> 2812 <tr> 2813 <td class="left">Vary</td> 2814 <td class="left"><a href="#header.vary" id="rfc.xref.header.vary.2" title="Vary">Section 7.2.1</a></td> 2815 </tr> 2816 </tbody> 2817 </table> 2818 </div> 2819 <div id="rfc.iref.v.1"></div> 2820 <h3 id="rfc.section.7.2.1"><a href="#rfc.section.7.2.1">7.2.1</a> <a id="header.vary" href="#header.vary">Vary</a></h3> 2821 <p id="rfc.section.7.2.1.p.1">The "Vary" header field conveys the set of header fields that were used to select the representation.</p> 2822 <p id="rfc.section.7.2.1.p.2">Caches use this information as part of determining whether a stored response can be used to satisfy a given request (<a href="p6-cache.html#caching.negotiated.responses" title="Using Negotiated Responses">Section 4.3</a> of <a href="#Part6" id="rfc.xref.Part6.16"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Caching">[Part6]</cite></a>). 2823 </p> 2824 <p id="rfc.section.7.2.1.p.3">In uncacheable or stale responses, the Vary field value advises the user agent about the criteria that were used to select 2825 the representation. 2826 </p> 2827 <div id="rfc.figure.u.42"></div><pre class="inline"><span id="rfc.iref.g.31"></span> <a href="#header.vary" class="smpl">Vary</a> = "*" / 1#<a href="#imported.abnf" class="smpl">field-name</a> 2828 </pre><p id="rfc.section.7.2.1.p.5">The set of header fields named by the Vary field value is known as the selecting header fields.</p> 2829 <p id="rfc.section.7.2.1.p.6">A server <em class="bcp14">SHOULD</em> include a Vary header field with any cacheable response that is subject to proactive negotiation. Doing so allows a cache 2830 to properly interpret future requests on that resource and informs the user agent about the presence of negotiation on that 2831 resource. A server <em class="bcp14">MAY</em> include a Vary header field with a non-cacheable response that is subject to proactive negotiation, since this might provide 2832 the user agent with useful information about the dimensions over which the response varies at the time of the response. 2833 </p> 2834 <p id="rfc.section.7.2.1.p.7">A Vary field value of "*" signals that unspecified parameters not limited to the header fields (e.g., the network address 2835 of the client), play a role in the selection of the response representation; therefore, a cache cannot determine whether this 2836 response is appropriate. A proxy <em class="bcp14">MUST NOT</em> generate the "*" value. 2837 </p> 2838 <p id="rfc.section.7.2.1.p.8">The field-names given are not limited to the set of standard header fields defined by this specification. Field names are 2839 case-insensitive. 2840 </p> 2841 <h2 id="rfc.section.7.3"><a href="#rfc.section.7.3">7.3</a> <a id="response.auth" href="#response.auth">Authentication Challenges</a></h2> 2842 <p id="rfc.section.7.3.p.1">Authentication challenges indicate what mechanisms are available for the client to provide authentication credentials in future 2843 requests. 2844 </p> 2845 <div id="rfc.table.u.12"> 2846 <table class="tt full left" cellpadding="3" cellspacing="0"> 2847 <thead> 2848 <tr> 2849 <th>Header Field Name</th> 2850 <th>Defined in...</th> 2851 </tr> 2852 </thead> 2853 <tbody> 2854 <tr> 2855 <td class="left">WWW-Authenticate</td> 2856 <td class="left"><a href="p7-auth.html#header.www-authenticate" title="WWW-Authenticate">Section 4.4</a> of <a href="#Part7" id="rfc.xref.Part7.6"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Authentication">[Part7]</cite></a></td> 2857 </tr> 2858 <tr> 2859 <td class="left">Proxy-Authenticate</td> 2860 <td class="left"><a href="p7-auth.html#header.proxy-authenticate" title="Proxy-Authenticate">Section 4.2</a> of <a href="#Part7" id="rfc.xref.Part7.7"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Authentication">[Part7]</cite></a></td> 2861 </tr> 2862 </tbody> 2863 </table> 2864 </div> 2865 <h2 id="rfc.section.7.4"><a href="#rfc.section.7.4">7.4</a> <a id="response.inform" href="#response.inform">Informative</a></h2> 2866 <p id="rfc.section.7.4.p.1">The remaining response header fields provide more information about the target resource for potential use in later requests.</p> 2867 <div id="rfc.table.u.13"> 2868 <table class="tt full left" cellpadding="3" cellspacing="0"> 2869 <thead> 2870 <tr> 2871 <th>Header Field Name</th> 2872 <th>Defined in...</th> 2873 </tr> 2874 </thead> 2875 <tbody> 2876 <tr> 2877 <td class="left">Accept-Ranges</td> 2878 <td class="left"><a href="p5-range.html#header.accept-ranges" title="Accept-Ranges">Section 5.1</a> of <a href="#Part5" id="rfc.xref.Part5.10"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Range Requests">[Part5]</cite></a></td> 2879 </tr> 2880 <tr> 2881 <td class="left">Allow</td> 2882 <td class="left"><a href="#header.allow" id="rfc.xref.header.allow.2" title="Allow">Section 7.4.1</a></td> 2883 </tr> 2884 <tr> 2885 <td class="left">Server</td> 2886 <td class="left"><a href="#header.server" id="rfc.xref.header.server.1" title="Server">Section 7.4.2</a></td> 2887 </tr> 2888 </tbody> 2889 </table> 2890 </div> 2891 <div id="rfc.iref.a.5"></div> 2892 <h3 id="rfc.section.7.4.1"><a href="#rfc.section.7.4.1">7.4.1</a> <a id="header.allow" href="#header.allow">Allow</a></h3> 2893 <p id="rfc.section.7.4.1.p.1">The "Allow" header field lists the set of methods advertised as supported by the target resource. The purpose of this field 2894 is strictly to inform the recipient of valid request methods associated with the resource. 2895 </p> 2896 <div id="rfc.figure.u.43"></div><pre class="inline"><span id="rfc.iref.g.32"></span> <a href="#header.allow" class="smpl">Allow</a> = #<a href="#method.overview" class="smpl">method</a> 2897 </pre><p id="rfc.section.7.4.1.p.3">Example of use:</p> 2898 <div id="rfc.figure.u.44"></div><pre class="text"> Allow: GET, HEAD, PUT 2899 </pre><p id="rfc.section.7.4.1.p.5">The actual set of allowed methods is defined by the origin server at the time of each request.</p> 2900 <p id="rfc.section.7.4.1.p.6">A proxy <em class="bcp14">MUST NOT</em> modify the Allow header field — it does not need to understand all the methods specified in order to handle them according 2901 to the generic message handling rules. 2902 </p> 2903 <div id="rfc.iref.s.8"></div> 2904 <h3 id="rfc.section.7.4.2"><a href="#rfc.section.7.4.2">7.4.2</a> <a id="header.server" href="#header.server">Server</a></h3> 2905 <p id="rfc.section.7.4.2.p.1">The "Server" header field contains information about the software used by the origin server to handle the request.</p> 2906 <p id="rfc.section.7.4.2.p.2">The field can contain multiple product tokens (<a href="#product.tokens" title="Product Tokens">Section 8.2</a>) and comments (<a href="p1-messaging.html#header.fields" title="Header Fields">Section 3.2</a> of <a href="#Part1" id="rfc.xref.Part1.24"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[Part1]</cite></a>) identifying the server and any significant subproducts. The product tokens are listed in order of their significance for 2907 identifying the application. 2908 </p> 2909 <div id="rfc.figure.u.45"></div><pre class="inline"><span id="rfc.iref.g.33"></span> <a href="#header.server" class="smpl">Server</a> = <a href="#product.tokens" class="smpl">product</a> *( <a href="#imported.abnf" class="smpl">RWS</a> ( <a href="#product.tokens" class="smpl">product</a> / <a href="#imported.abnf" class="smpl">comment</a> ) ) 2910 </pre><p id="rfc.section.7.4.2.p.4">Example:</p> 2911 <div id="rfc.figure.u.46"></div><pre class="text"> Server: CERN/3.0 libwww/2.17 2912 </pre><p id="rfc.section.7.4.2.p.6">If the response is being forwarded through a proxy, the proxy application <em class="bcp14">MUST NOT</em> modify the <a href="#header.server" class="smpl">Server</a> header field. Instead, it <em class="bcp14">MUST</em> include a <a href="p1-messaging.html#header.via" class="smpl">Via</a> field (as described in <a href="p1-messaging.html#header.via" title="Via">Section 5.7</a> of <a href="#Part1" id="rfc.xref.Part1.25"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[Part1]</cite></a>). 2913 </p> 2914 <div class="note" id="rfc.section.7.4.2.p.7"> 2915 <p> <b>Note:</b> Revealing the specific software version of the server might allow the server machine to become more vulnerable to attacks 2916 against software that is known to contain security holes. Server implementers are encouraged to make this field a configurable 2917 option. 2918 </p> 2919 </div> 2920 <h1 id="rfc.section.8"><a href="#rfc.section.8">8.</a> <a id="protocol.parameters" href="#protocol.parameters">Protocol Parameters</a></h1> 2921 <h2 id="rfc.section.8.1"><a href="#rfc.section.8.1">8.1</a> <a id="http.date" href="#http.date">Date/Time Formats</a></h2> 2922 <p id="rfc.section.8.1.p.1">HTTP applications have historically allowed three different formats for date/time stamps. However, the preferred format is 2843 <h3 id="rfc.section.8.1.1"><a href="#rfc.section.8.1.1">8.1.1</a> <a id="origination.date" href="#origination.date">Origination Date</a></h3> 2844 <h4 id="rfc.section.8.1.1.1"><a href="#rfc.section.8.1.1.1">8.1.1.1</a> <a id="http.date" href="#http.date">Date/Time Formats</a></h4> 2845 <p id="rfc.section.8.1.1.1.p.1">HTTP applications have historically allowed three different formats for date/time stamps. However, the preferred format is 2923 2846 a fixed-length subset of that defined by <a href="#RFC1123" id="rfc.xref.RFC1123.1"><cite title="Requirements for Internet Hosts - Application and Support">[RFC1123]</cite></a>: 2924 2847 </p> 2925 <div id="rfc.figure.u.4 7"></div><pre class="text">Sun, 06 Nov 1994 08:49:37 GMT ; RFC 11232926 </pre><p id="rfc.section.8.1. p.3">The other formats are described here only for compatibility with obsolete implementations.</p>2927 <div id="rfc.figure.u.4 8"></div><pre class="text">Sunday, 06-Nov-94 08:49:37 GMT ; obsolete RFC 850 format2848 <div id="rfc.figure.u.42"></div><pre class="text">Sun, 06 Nov 1994 08:49:37 GMT ; RFC 1123 2849 </pre><p id="rfc.section.8.1.1.1.p.3">The other formats are described here only for compatibility with obsolete implementations.</p> 2850 <div id="rfc.figure.u.43"></div><pre class="text">Sunday, 06-Nov-94 08:49:37 GMT ; obsolete RFC 850 format 2928 2851 Sun Nov 6 08:49:37 1994 ; ANSI C's asctime() format 2929 </pre><p id="rfc.section.8.1. p.5">HTTP/1.1 clients and servers that parse a date value <em class="bcp14">MUST</em> accept all three formats (for compatibility with HTTP/1.0), though they <em class="bcp14">MUST</em> only generate the RFC 1123 format for representing HTTP-date values in header fields.2930 </p> 2931 <p id="rfc.section.8.1. p.6">All HTTP date/time stamps <em class="bcp14">MUST</em> be represented in Greenwich Mean Time (GMT), without exception. For the purposes of HTTP, GMT is exactly equal to UTC (Coordinated2852 </pre><p id="rfc.section.8.1.1.1.p.5">HTTP/1.1 clients and servers that parse a date value <em class="bcp14">MUST</em> accept all three formats (for compatibility with HTTP/1.0), though they <em class="bcp14">MUST</em> only generate the RFC 1123 format for representing HTTP-date values in header fields. 2853 </p> 2854 <p id="rfc.section.8.1.1.1.p.6">All HTTP date/time stamps <em class="bcp14">MUST</em> be represented in Greenwich Mean Time (GMT), without exception. For the purposes of HTTP, GMT is exactly equal to UTC (Coordinated 2932 2855 Universal Time). This is indicated in the first two formats by the inclusion of "GMT" as the three-letter abbreviation for 2933 2856 time zone, and <em class="bcp14">MUST</em> be assumed when reading the asctime format. HTTP-date is case sensitive and <em class="bcp14">MUST NOT</em> include additional whitespace beyond that specifically included as SP in the grammar. 2934 2857 </p> 2935 <div id="rfc.figure.u.4 9"></div><pre class="inline"><span id="rfc.iref.g.34"></span> <a href="#http.date" class="smpl">HTTP-date</a> = <a href="#preferred.date.format" class="smpl">rfc1123-date</a> / <a href="#obsolete.date.formats" class="smpl">obs-date</a>2858 <div id="rfc.figure.u.44"></div><pre class="inline"><span id="rfc.iref.g.39"></span> <a href="#http.date" class="smpl">HTTP-date</a> = <a href="#preferred.date.format" class="smpl">rfc1123-date</a> / <a href="#obsolete.date.formats" class="smpl">obs-date</a> 2936 2859 </pre><div id="preferred.date.format"> 2937 <p id="rfc.section.8.1. p.8"> Preferred format:</p>2860 <p id="rfc.section.8.1.1.1.p.8"> Preferred format:</p> 2938 2861 </div> 2939 <div id="rfc.figure.u. 50"></div><pre class="inline"><span id="rfc.iref.g.35"></span><span id="rfc.iref.g.36"></span><span id="rfc.iref.g.37"></span><span id="rfc.iref.g.38"></span><span id="rfc.iref.g.39"></span><span id="rfc.iref.g.40"></span><span id="rfc.iref.g.41"></span><span id="rfc.iref.g.42"></span><span id="rfc.iref.g.43"></span><span id="rfc.iref.g.44"></span><span id="rfc.iref.g.45"></span><span id="rfc.iref.g.46"></span> <a href="#preferred.date.format" class="smpl">rfc1123-date</a> = <a href="#preferred.date.format" class="smpl">day-name</a> "," <a href="#imported.abnf" class="smpl">SP</a> date1 <a href="#imported.abnf" class="smpl">SP</a> <a href="#preferred.date.format" class="smpl">time-of-day</a> <a href="#imported.abnf" class="smpl">SP</a> <a href="#preferred.date.format" class="smpl">GMT</a>2862 <div id="rfc.figure.u.45"></div><pre class="inline"><span id="rfc.iref.g.40"></span><span id="rfc.iref.g.41"></span><span id="rfc.iref.g.42"></span><span id="rfc.iref.g.43"></span><span id="rfc.iref.g.44"></span><span id="rfc.iref.g.45"></span><span id="rfc.iref.g.46"></span><span id="rfc.iref.g.47"></span><span id="rfc.iref.g.48"></span><span id="rfc.iref.g.49"></span><span id="rfc.iref.g.50"></span><span id="rfc.iref.g.51"></span> <a href="#preferred.date.format" class="smpl">rfc1123-date</a> = <a href="#preferred.date.format" class="smpl">day-name</a> "," <a href="#imported.abnf" class="smpl">SP</a> date1 <a href="#imported.abnf" class="smpl">SP</a> <a href="#preferred.date.format" class="smpl">time-of-day</a> <a href="#imported.abnf" class="smpl">SP</a> <a href="#preferred.date.format" class="smpl">GMT</a> 2940 2863 ; fixed length subset of the format defined in 2941 2864 ; <a href="http://tools.ietf.org/html/rfc1123#section-5.2.14">Section 5.2.14</a> of <a href="#RFC1123" id="rfc.xref.RFC1123.2"><cite title="Requirements for Internet Hosts - Application and Support">[RFC1123]</cite></a> … … 2975 2898 <a href="#preferred.date.format" class="smpl">minute</a> = 2<a href="#imported.abnf" class="smpl">DIGIT</a> 2976 2899 <a href="#preferred.date.format" class="smpl">second</a> = 2<a href="#imported.abnf" class="smpl">DIGIT</a> 2977 </pre><p id="rfc.section.8.1. p.10">The semantics of <a href="#preferred.date.format" class="smpl">day-name</a>, <a href="#preferred.date.format" class="smpl">day</a>, <a href="#preferred.date.format" class="smpl">month</a>, <a href="#preferred.date.format" class="smpl">year</a>, and <a href="#preferred.date.format" class="smpl">time-of-day</a> are the same as those defined for the RFC 5322 constructs with the corresponding name (<a href="#RFC5322" id="rfc.xref.RFC5322.4"><cite title="Internet Message Format">[RFC5322]</cite></a>, <a href="http://tools.ietf.org/html/rfc5322#section-3.3">Section 3.3</a>).2900 </pre><p id="rfc.section.8.1.1.1.p.10">The semantics of <a href="#preferred.date.format" class="smpl">day-name</a>, <a href="#preferred.date.format" class="smpl">day</a>, <a href="#preferred.date.format" class="smpl">month</a>, <a href="#preferred.date.format" class="smpl">year</a>, and <a href="#preferred.date.format" class="smpl">time-of-day</a> are the same as those defined for the RFC 5322 constructs with the corresponding name (<a href="#RFC5322" id="rfc.xref.RFC5322.3"><cite title="Internet Message Format">[RFC5322]</cite></a>, <a href="http://tools.ietf.org/html/rfc5322#section-3.3">Section 3.3</a>). 2978 2901 </p> 2979 2902 <div id="obsolete.date.formats"> 2980 <p id="rfc.section.8.1. p.11"> Obsolete formats:</p>2903 <p id="rfc.section.8.1.1.1.p.11"> Obsolete formats:</p> 2981 2904 </div> 2982 <div id="rfc.figure.u. 51"></div><pre class="inline"><span id="rfc.iref.g.47"></span> <a href="#obsolete.date.formats" class="smpl">obs-date</a> = <a href="#obsolete.date.formats" class="smpl">rfc850-date</a> / <a href="#obsolete.date.formats" class="smpl">asctime-date</a>2983 </pre><div id="rfc.figure.u. 52"></div><pre class="inline"><span id="rfc.iref.g.48"></span> <a href="#obsolete.date.formats" class="smpl">rfc850-date</a> = <a href="#obsolete.date.formats" class="smpl">day-name-l</a> "," <a href="#imported.abnf" class="smpl">SP</a> <a href="#obsolete.date.formats" class="smpl">date2</a> <a href="#imported.abnf" class="smpl">SP</a> <a href="#preferred.date.format" class="smpl">time-of-day</a> <a href="#imported.abnf" class="smpl">SP</a> <a href="#preferred.date.format" class="smpl">GMT</a>2905 <div id="rfc.figure.u.46"></div><pre class="inline"><span id="rfc.iref.g.52"></span> <a href="#obsolete.date.formats" class="smpl">obs-date</a> = <a href="#obsolete.date.formats" class="smpl">rfc850-date</a> / <a href="#obsolete.date.formats" class="smpl">asctime-date</a> 2906 </pre><div id="rfc.figure.u.47"></div><pre class="inline"><span id="rfc.iref.g.53"></span> <a href="#obsolete.date.formats" class="smpl">rfc850-date</a> = <a href="#obsolete.date.formats" class="smpl">day-name-l</a> "," <a href="#imported.abnf" class="smpl">SP</a> <a href="#obsolete.date.formats" class="smpl">date2</a> <a href="#imported.abnf" class="smpl">SP</a> <a href="#preferred.date.format" class="smpl">time-of-day</a> <a href="#imported.abnf" class="smpl">SP</a> <a href="#preferred.date.format" class="smpl">GMT</a> 2984 2907 <a href="#obsolete.date.formats" class="smpl">date2</a> = <a href="#preferred.date.format" class="smpl">day</a> "-" <a href="#preferred.date.format" class="smpl">month</a> "-" 2<a href="#imported.abnf" class="smpl">DIGIT</a> 2985 2908 ; day-month-year (e.g., 02-Jun-82) … … 2992 2915 / %x53.61.74.75.72.64.61.79 ; "Saturday", case-sensitive 2993 2916 / %x53.75.6E.64.61.79 ; "Sunday", case-sensitive 2994 </pre><div id="rfc.figure.u. 53"></div><pre class="inline"><span id="rfc.iref.g.49"></span> <a href="#obsolete.date.formats" class="smpl">asctime-date</a> = <a href="#preferred.date.format" class="smpl">day-name</a> <a href="#imported.abnf" class="smpl">SP</a> <a href="#obsolete.date.formats" class="smpl">date3</a> <a href="#imported.abnf" class="smpl">SP</a> <a href="#preferred.date.format" class="smpl">time-of-day</a> <a href="#imported.abnf" class="smpl">SP</a> <a href="#preferred.date.format" class="smpl">year</a>2917 </pre><div id="rfc.figure.u.48"></div><pre class="inline"><span id="rfc.iref.g.54"></span> <a href="#obsolete.date.formats" class="smpl">asctime-date</a> = <a href="#preferred.date.format" class="smpl">day-name</a> <a href="#imported.abnf" class="smpl">SP</a> <a href="#obsolete.date.formats" class="smpl">date3</a> <a href="#imported.abnf" class="smpl">SP</a> <a href="#preferred.date.format" class="smpl">time-of-day</a> <a href="#imported.abnf" class="smpl">SP</a> <a href="#preferred.date.format" class="smpl">year</a> 2995 2918 <a href="#obsolete.date.formats" class="smpl">date3</a> = <a href="#preferred.date.format" class="smpl">month</a> <a href="#imported.abnf" class="smpl">SP</a> ( 2<a href="#imported.abnf" class="smpl">DIGIT</a> / ( <a href="#imported.abnf" class="smpl">SP</a> 1<a href="#imported.abnf" class="smpl">DIGIT</a> )) 2996 2919 ; month day (e.g., Jun 2) 2997 </pre><div class="note" id="rfc.section.8.1. p.15">2920 </pre><div class="note" id="rfc.section.8.1.1.1.p.15"> 2998 2921 <p> <b>Note:</b> Recipients of date values are encouraged to be robust in accepting date values that might have been sent by non-HTTP applications, 2999 2922 as is sometimes the case when retrieving or posting messages via proxies/gateways to SMTP or NNTP. 3000 2923 </p> 3001 2924 </div> 3002 <div class="note" id="rfc.section.8.1. p.16">2925 <div class="note" id="rfc.section.8.1.1.1.p.16"> 3003 2926 <p> <b>Note:</b> HTTP requirements for the date/time stamp format apply only to their usage within the protocol stream. Clients and servers 3004 2927 are not required to use these formats for user presentation, request logging, etc. 3005 2928 </p> 3006 2929 </div> 3007 <h2 id="rfc.section.8.2"><a href="#rfc.section.8.2">8.2</a> <a id="product.tokens" href="#product.tokens">Product Tokens</a></h2> 3008 <p id="rfc.section.8.2.p.1">Product tokens are used to allow communicating applications to identify themselves by software name and version. Most fields 3009 using product tokens also allow sub-products which form a significant part of the application to be listed, separated by whitespace. 3010 By convention, the products are listed in order of their significance for identifying the application. 3011 </p> 3012 <div id="rfc.figure.u.54"></div><pre class="inline"><span id="rfc.iref.g.50"></span><span id="rfc.iref.g.51"></span> <a href="#product.tokens" class="smpl">product</a> = <a href="#imported.abnf" class="smpl">token</a> ["/" <a href="#product.tokens" class="smpl">product-version</a>] 3013 <a href="#product.tokens" class="smpl">product-version</a> = <a href="#imported.abnf" class="smpl">token</a> 3014 </pre><p id="rfc.section.8.2.p.3">Examples:</p> 3015 <div id="rfc.figure.u.55"></div><pre class="text"> User-Agent: CERN-LineMode/2.15 libwww/2.17b3 3016 Server: Apache/0.8.4 3017 </pre><p id="rfc.section.8.2.p.5">Product tokens <em class="bcp14">SHOULD</em> be short and to the point. They <em class="bcp14">MUST NOT</em> be used for advertising or other non-essential information. Although any token octet <em class="bcp14">MAY</em> appear in a product-version, this token <em class="bcp14">SHOULD</em> only be used for a version identifier (i.e., successive versions of the same product <em class="bcp14">SHOULD</em> only differ in the product-version portion of the product value). 3018 </p> 3019 <h2 id="rfc.section.8.3"><a href="#rfc.section.8.3">8.3</a> <a id="character.sets" href="#character.sets">Character Encodings (charset)</a></h2> 3020 <p id="rfc.section.8.3.p.1">HTTP uses charset names to indicate the character encoding of a textual representation.</p> 3021 <div id="rule.charset"> 3022 <p id="rfc.section.8.3.p.2"> A character encoding is identified by a case-insensitive token. The complete set of tokens is defined by the IANA Character 3023 Set registry (<<a href="http://www.iana.org/assignments/character-sets">http://www.iana.org/assignments/character-sets</a>>). 3024 </p> 3025 </div> 3026 <div id="rfc.figure.u.56"></div><pre class="inline"><span id="rfc.iref.g.52"></span> <a href="#rule.charset" class="smpl">charset</a> = <a href="#imported.abnf" class="smpl">token</a> 3027 </pre><p id="rfc.section.8.3.p.4">Although HTTP allows an arbitrary token to be used as a charset value, any token that has a predefined value within the IANA 3028 Character Set registry <em class="bcp14">MUST</em> represent the character encoding defined by that registry. Applications <em class="bcp14">SHOULD</em> limit their use of character encodings to those defined within the IANA registry. 3029 </p> 3030 <p id="rfc.section.8.3.p.5">HTTP uses charset in two contexts: within an <a href="#header.accept-charset" class="smpl">Accept-Charset</a> request header field (in which the charset value is an unquoted token) and as the value of a parameter in a <a href="#header.content-type" class="smpl">Content-Type</a> header field (within a request or response), in which case the parameter value of the charset parameter can be quoted. 3031 </p> 3032 <p id="rfc.section.8.3.p.6">Implementers need to be aware of IETF character set requirements <a href="#RFC3629" id="rfc.xref.RFC3629.1"><cite title="UTF-8, a transformation format of ISO 10646">[RFC3629]</cite></a> <a href="#RFC2277" id="rfc.xref.RFC2277.1"><cite title="IETF Policy on Character Sets and Languages">[RFC2277]</cite></a>. 3033 </p> 3034 <h2 id="rfc.section.8.4"><a href="#rfc.section.8.4">8.4</a> <a id="content.codings" href="#content.codings">Content Codings</a></h2> 3035 <p id="rfc.section.8.4.p.1">Content coding values indicate an encoding transformation that has been or can be applied to a representation. Content codings 3036 are primarily used to allow a representation to be compressed or otherwise usefully transformed without losing the identity 3037 of its underlying media type and without loss of information. Frequently, the representation is stored in coded form, transmitted 3038 directly, and only decoded by the recipient. 3039 </p> 3040 <div id="rfc.figure.u.57"></div><pre class="inline"><span id="rfc.iref.g.53"></span> <a href="#content.codings" class="smpl">content-coding</a> = <a href="#imported.abnf" class="smpl">token</a> 3041 </pre><p id="rfc.section.8.4.p.3">All content-coding values are case-insensitive. HTTP/1.1 uses content-coding values in the <a href="#header.accept-encoding" class="smpl">Accept-Encoding</a> (<a href="#header.accept-encoding" id="rfc.xref.header.accept-encoding.3" title="Accept-Encoding">Section 5.3.4</a>) and <a href="#header.content-encoding" class="smpl">Content-Encoding</a> (<a href="#header.content-encoding" id="rfc.xref.header.content-encoding.2" title="Content-Encoding">Section 3.1.2</a>) header fields. Although the value describes the content-coding, what is more important is that it indicates what decoding 3042 mechanism will be required to remove the encoding. 3043 </p> 3044 <p id="rfc.section.8.4.p.4">compress<span id="rfc.iref.c.8"></span> 3045 </p> 3046 <ul class="empty"> 3047 <li>See <a href="p1-messaging.html#compress.coding" title="Compress Coding">Section 4.2.1</a> of <a href="#Part1" id="rfc.xref.Part1.26"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[Part1]</cite></a>. 3048 </li> 3049 </ul> 3050 <p id="rfc.section.8.4.p.5">deflate<span id="rfc.iref.d.3"></span> 3051 </p> 3052 <ul class="empty"> 3053 <li>See <a href="p1-messaging.html#deflate.coding" title="Deflate Coding">Section 4.2.2</a> of <a href="#Part1" id="rfc.xref.Part1.27"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[Part1]</cite></a>. 3054 </li> 3055 </ul> 3056 <p id="rfc.section.8.4.p.6">gzip<span id="rfc.iref.g.54"></span> 3057 </p> 3058 <ul class="empty"> 3059 <li>See <a href="p1-messaging.html#gzip.coding" title="Gzip Coding">Section 4.2.3</a> of <a href="#Part1" id="rfc.xref.Part1.28"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[Part1]</cite></a>. 3060 </li> 3061 </ul> 3062 <h2 id="rfc.section.8.5"><a href="#rfc.section.8.5">8.5</a> <a id="media.types" href="#media.types">Media Types</a></h2> 3063 <p id="rfc.section.8.5.p.1">HTTP uses Internet Media Types <a href="#RFC2046" id="rfc.xref.RFC2046.2"><cite title="Multipurpose Internet Mail Extensions (MIME) Part Two: Media Types">[RFC2046]</cite></a> in the <a href="#header.content-type" class="smpl">Content-Type</a> (<a href="#header.content-type" id="rfc.xref.header.content-type.3" title="Content-Type">Section 3.1.1</a>) and <a href="#header.accept" class="smpl">Accept</a> (<a href="#header.accept" id="rfc.xref.header.accept.3" title="Accept">Section 5.3.2</a>) header fields in order to provide open and extensible data typing and type negotiation. 3064 </p> 3065 <div id="rfc.figure.u.58"></div><pre class="inline"><span id="rfc.iref.g.55"></span><span id="rfc.iref.g.56"></span><span id="rfc.iref.g.57"></span> <a href="#media.types" class="smpl">media-type</a> = <a href="#media.types" class="smpl">type</a> "/" <a href="#media.types" class="smpl">subtype</a> *( <a href="#imported.abnf" class="smpl">OWS</a> ";" <a href="#imported.abnf" class="smpl">OWS</a> <a href="#rule.parameter" class="smpl">parameter</a> ) 3066 <a href="#media.types" class="smpl">type</a> = <a href="#imported.abnf" class="smpl">token</a> 3067 <a href="#media.types" class="smpl">subtype</a> = <a href="#imported.abnf" class="smpl">token</a> 3068 </pre><div id="rule.parameter"> 3069 <p id="rfc.section.8.5.p.3"> The type/subtype <em class="bcp14">MAY</em> be followed by parameters in the form of attribute/value pairs. 3070 </p> 3071 </div> 3072 <div id="rfc.figure.u.59"></div><pre class="inline"><span id="rfc.iref.g.58"></span><span id="rfc.iref.g.59"></span><span id="rfc.iref.g.60"></span> <a href="#rule.parameter" class="smpl">parameter</a> = <a href="#rule.parameter" class="smpl">attribute</a> "=" <a href="#rule.parameter" class="smpl">value</a> 3073 <a href="#rule.parameter" class="smpl">attribute</a> = <a href="#imported.abnf" class="smpl">token</a> 3074 <a href="#rule.parameter" class="smpl">value</a> = <a href="#imported.abnf" class="smpl">word</a> 3075 </pre><p id="rfc.section.8.5.p.5">The type, subtype, and parameter attribute names are case-insensitive. Parameter values might or might not be case-sensitive, 3076 depending on the semantics of the parameter name. The presence or absence of a parameter might be significant to the processing 3077 of a media-type, depending on its definition within the media type registry. 3078 </p> 3079 <p id="rfc.section.8.5.p.6">A parameter value that matches the <a href="#imported.abnf" class="smpl">token</a> production can be transmitted as either a token or within a quoted-string. The quoted and unquoted values are equivalent. 3080 </p> 3081 <p id="rfc.section.8.5.p.7">Media-type values are registered with the Internet Assigned Number Authority (IANA). The media type registration process is 3082 outlined in <a href="#RFC4288" id="rfc.xref.RFC4288.1"><cite title="Media Type Specifications and Registration Procedures">[RFC4288]</cite></a>. Use of non-registered media types is discouraged. 3083 </p> 3084 <h3 id="rfc.section.8.5.1"><a href="#rfc.section.8.5.1">8.5.1</a> <a id="canonicalization.and.text.defaults" href="#canonicalization.and.text.defaults">Canonicalization and Text Defaults</a></h3> 3085 <p id="rfc.section.8.5.1.p.1">Internet media types are registered with a canonical form. A representation transferred via HTTP messages <em class="bcp14">MUST</em> be in the appropriate canonical form prior to its transmission except for "text" types, as defined in the next paragraph. 3086 </p> 3087 <p id="rfc.section.8.5.1.p.2">When in canonical form, media subtypes of the "text" type use CRLF as the text line break. HTTP relaxes this requirement and 3088 allows the transport of text media with plain CR or LF alone representing a line break when it is done consistently for an 3089 entire representation. HTTP applications <em class="bcp14">MUST</em> accept CRLF, bare CR, and bare LF as indicating a line break in text media received via HTTP. In addition, if the text is 3090 in a character encoding that does not use octets 13 and 10 for CR and LF respectively, as is the case for some multi-byte 3091 character encodings, HTTP allows the use of whatever octet sequences are defined by that character encoding to represent the 3092 equivalent of CR and LF for line breaks. This flexibility regarding line breaks applies only to text media in the payload 3093 body; a bare CR or LF <em class="bcp14">MUST NOT</em> be substituted for CRLF within any of the HTTP control structures (such as header fields and multipart boundaries). 3094 </p> 3095 <p id="rfc.section.8.5.1.p.3">If a representation is encoded with a content-coding, the underlying data <em class="bcp14">MUST</em> be in a form defined above prior to being encoded. 3096 </p> 3097 <h3 id="rfc.section.8.5.2"><a href="#rfc.section.8.5.2">8.5.2</a> <a id="multipart.types" href="#multipart.types">Multipart Types</a></h3> 3098 <p id="rfc.section.8.5.2.p.1">MIME provides for a number of "multipart" types — encapsulations of one or more representations within a single message body. 3099 All multipart types share a common syntax, as defined in <a href="http://tools.ietf.org/html/rfc2046#section-5.1.1">Section 5.1.1</a> of <a href="#RFC2046" id="rfc.xref.RFC2046.3"><cite title="Multipurpose Internet Mail Extensions (MIME) Part Two: Media Types">[RFC2046]</cite></a>, and include a boundary parameter as part of the media type value. The message body is itself a protocol element; a sender <em class="bcp14">MUST</em> generate only CRLF to represent line breaks between body-parts. 3100 </p> 3101 <p id="rfc.section.8.5.2.p.2">In general, HTTP treats a multipart message body no differently than any other media type: strictly as payload. HTTP does 3102 not use the multipart boundary as an indicator of message body length. In all other respects, an HTTP user agent <em class="bcp14">SHOULD</em> follow the same or similar behavior as a MIME user agent would upon receipt of a multipart type. The MIME header fields within 3103 each body-part of a multipart message body do not have any significance to HTTP beyond that defined by their MIME semantics. 3104 </p> 3105 <p id="rfc.section.8.5.2.p.3">A recipient <em class="bcp14">MUST</em> treat an unrecognized multipart subtype as being equivalent to "multipart/mixed". 3106 </p> 3107 <div class="note" id="rfc.section.8.5.2.p.4"> 3108 <p> <b>Note:</b> The "multipart/form-data" type has been specifically defined for carrying form data suitable for processing via the POST request 3109 method, as described in <a href="#RFC2388" id="rfc.xref.RFC2388.1"><cite title="Returning Values from Forms: multipart/form-data">[RFC2388]</cite></a>. 2930 <div id="rfc.iref.d.3"></div> 2931 <h4 id="rfc.section.8.1.1.2"><a href="#rfc.section.8.1.1.2">8.1.1.2</a> <a id="header.date" href="#header.date">Date</a></h4> 2932 <p id="rfc.section.8.1.1.2.p.1">The "Date" header field represents the date and time at which the message was originated, having the same semantics as the 2933 Origination Date Field (orig-date) defined in <a href="http://tools.ietf.org/html/rfc5322#section-3.6.1">Section 3.6.1</a> of <a href="#RFC5322" id="rfc.xref.RFC5322.4"><cite title="Internet Message Format">[RFC5322]</cite></a>. The field value is an HTTP-date, as defined in <a href="#http.date" title="Date/Time Formats">Section 8.1.1.1</a>; it <em class="bcp14">MUST</em> be sent in rfc1123-date format. 2934 </p> 2935 <div id="rfc.figure.u.49"></div><pre class="inline"><span id="rfc.iref.g.55"></span> <a href="#header.date" class="smpl">Date</a> = <a href="#http.date" class="smpl">HTTP-date</a> 2936 </pre><p id="rfc.section.8.1.1.2.p.3">An example is</p> 2937 <div id="rfc.figure.u.50"></div><pre class="text"> Date: Tue, 15 Nov 1994 08:12:31 GMT 2938 </pre><p id="rfc.section.8.1.1.2.p.5">Origin servers <em class="bcp14">MUST</em> include a Date header field in all responses, except in these cases: 2939 </p> 2940 <ol> 2941 <li>If the response status code is <a href="#status.100" class="smpl">100 (Continue)</a> or <a href="#status.101" class="smpl">101 (Switching Protocols)</a>, the response <em class="bcp14">MAY</em> include a Date header field, at the server's option. 2942 </li> 2943 <li>If the response status code conveys a server error, e.g., <a href="#status.500" class="smpl">500 2944 (Internal Server Error)</a> or <a href="#status.503" class="smpl">503 (Service Unavailable)</a>, and it is inconvenient or impossible to generate a valid Date. 2945 </li> 2946 <li>If the server does not have a clock that can provide a reasonable approximation of the current time, its responses <em class="bcp14">MUST NOT</em> include a Date header field. 2947 </li> 2948 </ol> 2949 <p id="rfc.section.8.1.1.2.p.6">A received message that does not have a Date header field <em class="bcp14">MUST</em> be assigned one by the recipient if the message will be cached by that recipient. 2950 </p> 2951 <p id="rfc.section.8.1.1.2.p.7">Clients can use the Date header field as well; in order to keep request messages small, they are advised not to include it 2952 when it doesn't convey any useful information (as is usually the case for requests that do not contain a payload). 2953 </p> 2954 <p id="rfc.section.8.1.1.2.p.8">The HTTP-date sent in a Date header field <em class="bcp14">SHOULD NOT</em> represent a date and time subsequent to the generation of the message. It <em class="bcp14">SHOULD</em> represent the best available approximation of the date and time of message generation, unless the implementation has no means 2955 of generating a reasonably accurate date and time. In theory, the date ought to represent the moment just before the payload 2956 is generated. In practice, the date can be generated at any time during the message origination without affecting its semantic 2957 value. 2958 </p> 2959 <div id="rfc.iref.l.1"></div> 2960 <h3 id="rfc.section.8.1.2"><a href="#rfc.section.8.1.2">8.1.2</a> <a id="header.location" href="#header.location">Location</a></h3> 2961 <p id="rfc.section.8.1.2.p.1">The "Location" header field <em class="bcp14">MAY</em> be sent in responses to refer to a specific resource in accordance with the semantics of the status code. 2962 </p> 2963 <div id="rfc.figure.u.51"></div><pre class="inline"><span id="rfc.iref.g.56"></span> <a href="#header.location" class="smpl">Location</a> = <a href="#imported.abnf" class="smpl">URI-reference</a> 2964 </pre><p id="rfc.section.8.1.2.p.3">For <a href="#status.201" class="smpl">201 (Created)</a> responses, the Location is the URI of the new resource which was created by the request. For <a href="#status.3xx" class="smpl">3xx (Redirection)</a> responses, the location <em class="bcp14">SHOULD</em> indicate the server's preferred URI for automatic redirection to the resource. 2965 </p> 2966 <p id="rfc.section.8.1.2.p.4">The field value consists of a single URI-reference. When it has the form of a relative reference (<a href="#RFC3986" id="rfc.xref.RFC3986.1"><cite title="Uniform Resource Identifier (URI): Generic Syntax">[RFC3986]</cite></a>, <a href="http://tools.ietf.org/html/rfc3986#section-4.2">Section 4.2</a>), the final value is computed by resolving it against the effective request URI (<a href="#RFC3986" id="rfc.xref.RFC3986.2"><cite title="Uniform Resource Identifier (URI): Generic Syntax">[RFC3986]</cite></a>, <a href="http://tools.ietf.org/html/rfc3986#section-5">Section 5</a>). If the original URI, as navigated to by the user agent, did contain a fragment identifier, and the final value does not, 2967 then the original URI's fragment identifier is added to the final value. 2968 </p> 2969 <div id="rfc.figure.u.52"></div> 2970 <p>For example, the original URI "http://www.example.org/~tim", combined with a field value given as:</p> <pre class="text"> Location: /pub/WWW/People.html#tim 2971 </pre> <p>would result in a final value of "http://www.example.org/pub/WWW/People.html#tim"</p> 2972 <div id="rfc.figure.u.53"></div> 2973 <p>An original URI "http://www.example.org/index.html#larry", combined with a field value given as:</p> <pre class="text"> Location: http://www.example.net/index.html 2974 </pre> <p>would result in a final value of "http://www.example.net/index.html#larry", preserving the original fragment identifier.</p> 2975 <div class="note" id="rfc.section.8.1.2.p.7"> 2976 <p> <b>Note:</b> Some recipients attempt to recover from Location fields that are not valid URI references. This specification does not mandate 2977 or define such processing, but does allow it. 3110 2978 </p> 3111 2979 </div> 3112 <h2 id="rfc.section.8.6"><a href="#rfc.section.8.6">8.6</a> <a id="language.tags" href="#language.tags">Language Tags</a></h2> 3113 <p id="rfc.section.8.6.p.1">A language tag, as defined in <a href="#RFC5646" id="rfc.xref.RFC5646.1"><cite title="Tags for Identifying Languages">[RFC5646]</cite></a>, identifies a natural language spoken, written, or otherwise conveyed by human beings for communication of information to 3114 other human beings. Computer languages are explicitly excluded. HTTP uses language tags within the <a href="#header.accept-language" class="smpl">Accept-Language</a> and <a href="#header.content-language" class="smpl">Content-Language</a> fields. 3115 </p> 3116 <p id="rfc.section.8.6.p.2">In summary, a language tag is composed of one or more parts: A primary language subtag followed by a possibly empty series 3117 of subtags: 3118 </p> 3119 <div id="rfc.figure.u.60"></div><pre class="inline"><span id="rfc.iref.g.61"></span> <a href="#language.tags" class="smpl">language-tag</a> = <Language-Tag, defined in <a href="#RFC5646" id="rfc.xref.RFC5646.2"><cite title="Tags for Identifying Languages">[RFC5646]</cite></a>, <a href="http://tools.ietf.org/html/rfc5646#section-2.1">Section 2.1</a>> 3120 </pre><p id="rfc.section.8.6.p.4">White space is not allowed within the tag and all tags are case-insensitive. The name space of language subtags is administered 3121 by the IANA (see <<a href="http://www.iana.org/assignments/language-subtag-registry">http://www.iana.org/assignments/language-subtag-registry</a>>). 3122 </p> 3123 <div id="rfc.figure.u.61"></div> 3124 <p>Example tags include:</p> <pre class="text"> en, en-US, es-419, az-Arab, x-pig-latin, man-Nkoo-GN 3125 </pre> <p id="rfc.section.8.6.p.6">See <a href="#RFC5646" id="rfc.xref.RFC5646.3"><cite title="Tags for Identifying Languages">[RFC5646]</cite></a> for further information. 3126 </p> 2980 <p id="rfc.section.8.1.2.p.8">There are circumstances in which a fragment identifier in a Location URI would not be appropriate. For instance, when it appears 2981 in a <a href="#status.201" class="smpl">201 2982 (Created)</a> response, where the Location header field specifies the URI for the entire created resource. 2983 </p> 2984 <div class="note" id="rfc.section.8.1.2.p.9"> 2985 <p> <b>Note:</b> The <a href="#header.content-location" class="smpl">Content-Location</a> header field (<a href="#header.content-location" id="rfc.xref.header.content-location.3" title="Content-Location">Section 3.1.4.2</a>) differs from Location in that the Content-Location identifies the most specific resource corresponding to the enclosed representation. 2986 It is therefore possible for a response to contain header fields for both Location and Content-Location. 2987 </p> 2988 </div> 2989 <div id="rfc.iref.r.3"></div> 2990 <h3 id="rfc.section.8.1.3"><a href="#rfc.section.8.1.3">8.1.3</a> <a id="header.retry-after" href="#header.retry-after">Retry-After</a></h3> 2991 <p id="rfc.section.8.1.3.p.1">The header "Retry-After" field can be used with a <a href="#status.503" class="smpl">503 (Service 2992 Unavailable)</a> response to indicate how long the service is expected to be unavailable to the requesting client. This field <em class="bcp14">MAY</em> also be used with any <a href="#status.3xx" class="smpl">3xx (Redirection)</a> response to indicate the minimum time the user-agent is asked to wait before issuing the redirected request. 2993 </p> 2994 <p id="rfc.section.8.1.3.p.2">The value of this field can be either an HTTP-date or an integer number of seconds (in decimal) after the time of the response.</p> 2995 <div id="rfc.figure.u.54"></div><pre class="inline"><span id="rfc.iref.g.57"></span> <a href="#header.retry-after" class="smpl">Retry-After</a> = <a href="#http.date" class="smpl">HTTP-date</a> / <a href="#rule.delta-seconds" class="smpl">delta-seconds</a> 2996 </pre><div id="rule.delta-seconds"> 2997 <p id="rfc.section.8.1.3.p.4"> Time spans are non-negative decimal integers, representing time in seconds.</p> 2998 </div> 2999 <div id="rfc.figure.u.55"></div><pre class="inline"><span id="rfc.iref.g.58"></span> <a href="#rule.delta-seconds" class="smpl">delta-seconds</a> = 1*<a href="#imported.abnf" class="smpl">DIGIT</a> 3000 </pre><p id="rfc.section.8.1.3.p.6">Two examples of its use are</p> 3001 <div id="rfc.figure.u.56"></div><pre class="text"> Retry-After: Fri, 31 Dec 1999 23:59:59 GMT 3002 Retry-After: 120 3003 </pre><p id="rfc.section.8.1.3.p.8">In the latter example, the delay is 2 minutes.</p> 3004 <h2 id="rfc.section.8.2"><a href="#rfc.section.8.2">8.2</a> <a id="selected.representation" href="#selected.representation">Selected Representation Header Fields</a></h2> 3005 <p id="rfc.section.8.2.p.1"><span id="rfc.iref.s.7"></span> We use the term "<dfn>selected representation</dfn>" to refer to the the current representation of a target resource that would have been selected in a successful response if 3006 the same request had used the method GET and excluded any conditional request header fields. 3007 </p> 3008 <p id="rfc.section.8.2.p.2">Additional header fields define metadata about the selected representation, which might differ from the representation included 3009 in the message for responses to some state-changing methods. The following header fields are defined as selected representation 3010 metadata: 3011 </p> 3012 <div id="rfc.table.u.11"> 3013 <table class="tt full left" cellpadding="3" cellspacing="0"> 3014 <thead> 3015 <tr> 3016 <th>Header Field Name</th> 3017 <th>Defined in...</th> 3018 </tr> 3019 </thead> 3020 <tbody> 3021 <tr> 3022 <td class="left">ETag</td> 3023 <td class="left"><a href="p4-conditional.html#header.etag" title="ETag">Section 2.3</a> of <a href="#Part4" id="rfc.xref.Part4.12"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Conditional Requests">[Part4]</cite></a></td> 3024 </tr> 3025 <tr> 3026 <td class="left">Last-Modified</td> 3027 <td class="left"><a href="p4-conditional.html#header.last-modified" title="Last-Modified">Section 2.2</a> of <a href="#Part4" id="rfc.xref.Part4.13"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Conditional Requests">[Part4]</cite></a></td> 3028 </tr> 3029 <tr> 3030 <td class="left">Vary</td> 3031 <td class="left"><a href="#header.vary" id="rfc.xref.header.vary.2" title="Vary">Section 8.2.1</a></td> 3032 </tr> 3033 </tbody> 3034 </table> 3035 </div> 3036 <div id="rfc.iref.v.1"></div> 3037 <h3 id="rfc.section.8.2.1"><a href="#rfc.section.8.2.1">8.2.1</a> <a id="header.vary" href="#header.vary">Vary</a></h3> 3038 <p id="rfc.section.8.2.1.p.1">The "Vary" header field conveys the set of header fields that were used to select the representation.</p> 3039 <p id="rfc.section.8.2.1.p.2">Caches use this information as part of determining whether a stored response can be used to satisfy a given request (<a href="p6-cache.html#caching.negotiated.responses" title="Using Negotiated Responses">Section 4.3</a> of <a href="#Part6" id="rfc.xref.Part6.16"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Caching">[Part6]</cite></a>). 3040 </p> 3041 <p id="rfc.section.8.2.1.p.3">In uncacheable or stale responses, the Vary field value advises the user agent about the criteria that were used to select 3042 the representation. 3043 </p> 3044 <div id="rfc.figure.u.57"></div><pre class="inline"><span id="rfc.iref.g.59"></span> <a href="#header.vary" class="smpl">Vary</a> = "*" / 1#<a href="#imported.abnf" class="smpl">field-name</a> 3045 </pre><p id="rfc.section.8.2.1.p.5">The set of header fields named by the Vary field value is known as the selecting header fields.</p> 3046 <p id="rfc.section.8.2.1.p.6">A server <em class="bcp14">SHOULD</em> include a Vary header field with any cacheable response that is subject to proactive negotiation. Doing so allows a cache 3047 to properly interpret future requests on that resource and informs the user agent about the presence of negotiation on that 3048 resource. A server <em class="bcp14">MAY</em> include a Vary header field with a non-cacheable response that is subject to proactive negotiation, since this might provide 3049 the user agent with useful information about the dimensions over which the response varies at the time of the response. 3050 </p> 3051 <p id="rfc.section.8.2.1.p.7">A Vary field value of "*" signals that unspecified parameters not limited to the header fields (e.g., the network address 3052 of the client), play a role in the selection of the response representation; therefore, a cache cannot determine whether this 3053 response is appropriate. A proxy <em class="bcp14">MUST NOT</em> generate the "*" value. 3054 </p> 3055 <p id="rfc.section.8.2.1.p.8">The field-names given are not limited to the set of standard header fields defined by this specification. Field names are 3056 case-insensitive. 3057 </p> 3058 <h2 id="rfc.section.8.3"><a href="#rfc.section.8.3">8.3</a> <a id="response.auth" href="#response.auth">Authentication Challenges</a></h2> 3059 <p id="rfc.section.8.3.p.1">Authentication challenges indicate what mechanisms are available for the client to provide authentication credentials in future 3060 requests. 3061 </p> 3062 <div id="rfc.table.u.12"> 3063 <table class="tt full left" cellpadding="3" cellspacing="0"> 3064 <thead> 3065 <tr> 3066 <th>Header Field Name</th> 3067 <th>Defined in...</th> 3068 </tr> 3069 </thead> 3070 <tbody> 3071 <tr> 3072 <td class="left">WWW-Authenticate</td> 3073 <td class="left"><a href="p7-auth.html#header.www-authenticate" title="WWW-Authenticate">Section 4.4</a> of <a href="#Part7" id="rfc.xref.Part7.6"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Authentication">[Part7]</cite></a></td> 3074 </tr> 3075 <tr> 3076 <td class="left">Proxy-Authenticate</td> 3077 <td class="left"><a href="p7-auth.html#header.proxy-authenticate" title="Proxy-Authenticate">Section 4.2</a> of <a href="#Part7" id="rfc.xref.Part7.7"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Authentication">[Part7]</cite></a></td> 3078 </tr> 3079 </tbody> 3080 </table> 3081 </div> 3082 <h2 id="rfc.section.8.4"><a href="#rfc.section.8.4">8.4</a> <a id="response.inform" href="#response.inform">Informative</a></h2> 3083 <p id="rfc.section.8.4.p.1">The remaining response header fields provide more information about the target resource for potential use in later requests.</p> 3084 <div id="rfc.table.u.13"> 3085 <table class="tt full left" cellpadding="3" cellspacing="0"> 3086 <thead> 3087 <tr> 3088 <th>Header Field Name</th> 3089 <th>Defined in...</th> 3090 </tr> 3091 </thead> 3092 <tbody> 3093 <tr> 3094 <td class="left">Accept-Ranges</td> 3095 <td class="left"><a href="p5-range.html#header.accept-ranges" title="Accept-Ranges">Section 5.1</a> of <a href="#Part5" id="rfc.xref.Part5.10"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Range Requests">[Part5]</cite></a></td> 3096 </tr> 3097 <tr> 3098 <td class="left">Allow</td> 3099 <td class="left"><a href="#header.allow" id="rfc.xref.header.allow.2" title="Allow">Section 8.4.1</a></td> 3100 </tr> 3101 <tr> 3102 <td class="left">Server</td> 3103 <td class="left"><a href="#header.server" id="rfc.xref.header.server.1" title="Server">Section 8.4.2</a></td> 3104 </tr> 3105 </tbody> 3106 </table> 3107 </div> 3108 <div id="rfc.iref.a.5"></div> 3109 <h3 id="rfc.section.8.4.1"><a href="#rfc.section.8.4.1">8.4.1</a> <a id="header.allow" href="#header.allow">Allow</a></h3> 3110 <p id="rfc.section.8.4.1.p.1">The "Allow" header field lists the set of methods advertised as supported by the target resource. The purpose of this field 3111 is strictly to inform the recipient of valid request methods associated with the resource. 3112 </p> 3113 <div id="rfc.figure.u.58"></div><pre class="inline"><span id="rfc.iref.g.60"></span> <a href="#header.allow" class="smpl">Allow</a> = #<a href="#method.overview" class="smpl">method</a> 3114 </pre><p id="rfc.section.8.4.1.p.3">Example of use:</p> 3115 <div id="rfc.figure.u.59"></div><pre class="text"> Allow: GET, HEAD, PUT 3116 </pre><p id="rfc.section.8.4.1.p.5">The actual set of allowed methods is defined by the origin server at the time of each request.</p> 3117 <p id="rfc.section.8.4.1.p.6">A proxy <em class="bcp14">MUST NOT</em> modify the Allow header field — it does not need to understand all the methods specified in order to handle them according 3118 to the generic message handling rules. 3119 </p> 3120 <div id="rfc.iref.s.8"></div> 3121 <h3 id="rfc.section.8.4.2"><a href="#rfc.section.8.4.2">8.4.2</a> <a id="header.server" href="#header.server">Server</a></h3> 3122 <p id="rfc.section.8.4.2.p.1">The "Server" header field contains information about the software used by the origin server to handle the request.</p> 3123 <p id="rfc.section.8.4.2.p.2">The field can contain multiple product tokens (<a href="#product.tokens" title="Product Tokens">Section 4</a>) and comments (<a href="p1-messaging.html#header.fields" title="Header Fields">Section 3.2</a> of <a href="#Part1" id="rfc.xref.Part1.27"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[Part1]</cite></a>) identifying the server and any significant subproducts. The product tokens are listed in order of their significance for 3124 identifying the application. 3125 </p> 3126 <div id="rfc.figure.u.60"></div><pre class="inline"><span id="rfc.iref.g.61"></span> <a href="#header.server" class="smpl">Server</a> = <a href="#product.tokens" class="smpl">product</a> *( <a href="#imported.abnf" class="smpl">RWS</a> ( <a href="#product.tokens" class="smpl">product</a> / <a href="#imported.abnf" class="smpl">comment</a> ) ) 3127 </pre><p id="rfc.section.8.4.2.p.4">Example:</p> 3128 <div id="rfc.figure.u.61"></div><pre class="text"> Server: CERN/3.0 libwww/2.17 3129 </pre><p id="rfc.section.8.4.2.p.6">If the response is being forwarded through a proxy, the proxy application <em class="bcp14">MUST NOT</em> modify the <a href="#header.server" class="smpl">Server</a> header field. Instead, it <em class="bcp14">MUST</em> include a <a href="p1-messaging.html#header.via" class="smpl">Via</a> field (as described in <a href="p1-messaging.html#header.via" title="Via">Section 5.7</a> of <a href="#Part1" id="rfc.xref.Part1.28"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[Part1]</cite></a>). 3130 </p> 3131 <div class="note" id="rfc.section.8.4.2.p.7"> 3132 <p> <b>Note:</b> Revealing the specific software version of the server might allow the server machine to become more vulnerable to attacks 3133 against software that is known to contain security holes. Server implementers are encouraged to make this field a configurable 3134 option. 3135 </p> 3136 </div> 3127 3137 <h1 id="rfc.section.9"><a href="#rfc.section.9">9.</a> <a id="IANA.considerations" href="#IANA.considerations">IANA Considerations</a></h1> 3128 3138 <h2 id="rfc.section.9.1"><a href="#rfc.section.9.1">9.1</a> <a id="method.registry" href="#method.registry">Method Registry</a></h2> 3129 <p id="rfc.section.9.1.p.1">The HTTP Method Registry defines the name space for the request method token (<a href="#methods" title="Request Methods">Section 4</a>). The method registry is maintained at <<a href="http://www.iana.org/assignments/http-methods">http://www.iana.org/assignments/http-methods</a>>.3139 <p id="rfc.section.9.1.p.1">The HTTP Method Registry defines the name space for the request method token (<a href="#methods" title="Request Methods">Section 5</a>). The method registry is maintained at <<a href="http://www.iana.org/assignments/http-methods">http://www.iana.org/assignments/http-methods</a>>. 3130 3140 </p> 3131 3141 <h3 id="rfc.section.9.1.1"><a href="#rfc.section.9.1.1">9.1.1</a> <a id="method.procedure" href="#method.procedure">Procedure</a></h3> … … 3133 3143 </p> 3134 3144 <ul> 3135 <li>Method Name (see <a href="#methods" title="Request Methods">Section 4</a>)3136 </li> 3137 <li>Safe ("yes" or "no", see <a href="#safe.methods" title="Safe Methods">Section 4.2.1</a>)3138 </li> 3139 <li>Idempotent ("yes" or "no", see <a href="#idempotent.methods" title="Idempotent Methods">Section 4.2.2</a>)3145 <li>Method Name (see <a href="#methods" title="Request Methods">Section 5</a>) 3146 </li> 3147 <li>Safe ("yes" or "no", see <a href="#safe.methods" title="Safe Methods">Section 5.2.1</a>) 3148 </li> 3149 <li>Idempotent ("yes" or "no", see <a href="#idempotent.methods" title="Idempotent Methods">Section 5.2.2</a>) 3140 3150 </li> 3141 3151 <li>Pointer to specification text</li> … … 3153 3163 value of "0". 3154 3164 </p> 3155 <p id="rfc.section.9.1.2.p.3">New method definitions need to indicate whether they are safe (<a href="#safe.methods" title="Safe Methods">Section 4.2.1</a>), idempotent (<a href="#idempotent.methods" title="Idempotent Methods">Section 4.2.2</a>), cacheable (<a href="#cacheable.methods" title="Cacheable Methods">Section 4.2.3</a>), and what semantics are to be associated with the payload body if any is present in the request. If a method is cacheable,3165 <p id="rfc.section.9.1.2.p.3">New method definitions need to indicate whether they are safe (<a href="#safe.methods" title="Safe Methods">Section 5.2.1</a>), idempotent (<a href="#idempotent.methods" title="Idempotent Methods">Section 5.2.2</a>), cacheable (<a href="#cacheable.methods" title="Cacheable Methods">Section 5.2.3</a>), and what semantics are to be associated with the payload body if any is present in the request. If a method is cacheable, 3156 3166 the method definition ought to describe how, and under what conditions, a cache can store a response and use it to satisfy 3157 3167 a subsequent request. … … 3175 3185 <td class="left">no</td> 3176 3186 <td class="left">no</td> 3177 <td class="left"> <a href="#CONNECT" id="rfc.xref.CONNECT.2" title="CONNECT">Section 4.3.6</a>3187 <td class="left"> <a href="#CONNECT" id="rfc.xref.CONNECT.2" title="CONNECT">Section 5.3.6</a> 3178 3188 </td> 3179 3189 </tr> … … 3182 3192 <td class="left">no</td> 3183 3193 <td class="left">yes</td> 3184 <td class="left"> <a href="#DELETE" id="rfc.xref.DELETE.2" title="DELETE">Section 4.3.5</a>3194 <td class="left"> <a href="#DELETE" id="rfc.xref.DELETE.2" title="DELETE">Section 5.3.5</a> 3185 3195 </td> 3186 3196 </tr> … … 3189 3199 <td class="left">yes</td> 3190 3200 <td class="left">yes</td> 3191 <td class="left"> <a href="#GET" id="rfc.xref.GET.3" title="GET">Section 4.3.1</a>3201 <td class="left"> <a href="#GET" id="rfc.xref.GET.3" title="GET">Section 5.3.1</a> 3192 3202 </td> 3193 3203 </tr> … … 3196 3206 <td class="left">yes</td> 3197 3207 <td class="left">yes</td> 3198 <td class="left"> <a href="#HEAD" id="rfc.xref.HEAD.2" title="HEAD">Section 4.3.2</a>3208 <td class="left"> <a href="#HEAD" id="rfc.xref.HEAD.2" title="HEAD">Section 5.3.2</a> 3199 3209 </td> 3200 3210 </tr> … … 3203 3213 <td class="left">yes</td> 3204 3214 <td class="left">yes</td> 3205 <td class="left"> <a href="#OPTIONS" id="rfc.xref.OPTIONS.3" title="OPTIONS">Section 4.3.7</a>3215 <td class="left"> <a href="#OPTIONS" id="rfc.xref.OPTIONS.3" title="OPTIONS">Section 5.3.7</a> 3206 3216 </td> 3207 3217 </tr> … … 3210 3220 <td class="left">no</td> 3211 3221 <td class="left">no</td> 3212 <td class="left"> <a href="#POST" id="rfc.xref.POST.3" title="POST">Section 4.3.3</a>3222 <td class="left"> <a href="#POST" id="rfc.xref.POST.3" title="POST">Section 5.3.3</a> 3213 3223 </td> 3214 3224 </tr> … … 3217 3227 <td class="left">no</td> 3218 3228 <td class="left">yes</td> 3219 <td class="left"> <a href="#PUT" id="rfc.xref.PUT.3" title="PUT">Section 4.3.4</a>3229 <td class="left"> <a href="#PUT" id="rfc.xref.PUT.3" title="PUT">Section 5.3.4</a> 3220 3230 </td> 3221 3231 </tr> … … 3224 3234 <td class="left">yes</td> 3225 3235 <td class="left">yes</td> 3226 <td class="left"> <a href="#TRACE" id="rfc.xref.TRACE.3" title="TRACE">Section 4.3.8</a>3236 <td class="left"> <a href="#TRACE" id="rfc.xref.TRACE.3" title="TRACE">Section 5.3.8</a> 3227 3237 </td> 3228 3238 </tr> … … 3231 3241 </div> 3232 3242 <h2 id="rfc.section.9.2"><a href="#rfc.section.9.2">9.2</a> <a id="status.code.registry" href="#status.code.registry">Status Code Registry</a></h2> 3233 <p id="rfc.section.9.2.p.1">The HTTP Status Code Registry defines the name space for the response status-code token (<a href="#status.codes" title="Response Status Codes">Section 6</a>). The status code registry is maintained at <<a href="http://www.iana.org/assignments/http-status-codes">http://www.iana.org/assignments/http-status-codes</a>>.3243 <p id="rfc.section.9.2.p.1">The HTTP Status Code Registry defines the name space for the response status-code token (<a href="#status.codes" title="Response Status Codes">Section 7</a>). The status code registry is maintained at <<a href="http://www.iana.org/assignments/http-status-codes">http://www.iana.org/assignments/http-status-codes</a>>. 3234 3244 </p> 3235 3245 <p id="rfc.section.9.2.p.2">This section replaces the registration procedure for HTTP Status Codes previously defined in <a href="http://tools.ietf.org/html/rfc2817#section-7.1">Section 7.1</a> of <a href="#RFC2817" id="rfc.xref.RFC2817.1"><cite title="Upgrading to TLS Within HTTP/1.1">[RFC2817]</cite></a>. … … 3244 3254 isn't specific to a single application. 3245 3255 </p> 3246 <p id="rfc.section.9.2.2.p.2">New status codes are required to fall under one of the categories defined in <a href="#status.codes" title="Response Status Codes">Section 6</a>. To allow existing parsers to properly handle them, new status codes cannot disallow a payload, although they can mandate3256 <p id="rfc.section.9.2.2.p.2">New status codes are required to fall under one of the categories defined in <a href="#status.codes" title="Response Status Codes">Section 7</a>. To allow existing parsers to properly handle them, new status codes cannot disallow a payload, although they can mandate 3247 3257 a zero-length payload body. 3248 3258 </p> … … 3250 3260 code (e.g., combinations of request header fields and/or method(s)) along with any dependencies on response header fields 3251 3261 (e.g., what fields are required and what fields can modify the semantics). A response that can transfer a payload ought to 3252 specify expected cache behavior (e.g., cacheability and freshness criteria, as described in <a href="#Part6" id="rfc.xref.Part6.17"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Caching">[Part6]</cite></a>) and whether the payload has any implied association with an identified resource (<a href="#identifying.payload" title="Identifying the Payload">Section 3. 3.2</a>).3262 specify expected cache behavior (e.g., cacheability and freshness criteria, as described in <a href="#Part6" id="rfc.xref.Part6.17"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Caching">[Part6]</cite></a>) and whether the payload has any implied association with an identified resource (<a href="#identifying.payload" title="Identifying the Payload">Section 3.1.4.1</a>). 3253 3263 </p> 3254 3264 <h3 id="rfc.section.9.2.3"><a href="#rfc.section.9.2.3">9.2.3</a> <a id="status.code.registration" href="#status.code.registration">Registrations</a></h3> … … 3268 3278 <td class="left">100</td> 3269 3279 <td class="left">Continue</td> 3270 <td class="left"> <a href="#status.100" id="rfc.xref.status.100.4" title="100 Continue">Section 6.2.1</a>3280 <td class="left"> <a href="#status.100" id="rfc.xref.status.100.4" title="100 Continue">Section 7.2.1</a> 3271 3281 </td> 3272 3282 </tr> … … 3274 3284 <td class="left">101</td> 3275 3285 <td class="left">Switching Protocols</td> 3276 <td class="left"> <a href="#status.101" id="rfc.xref.status.101.2" title="101 Switching Protocols">Section 6.2.2</a>3286 <td class="left"> <a href="#status.101" id="rfc.xref.status.101.2" title="101 Switching Protocols">Section 7.2.2</a> 3277 3287 </td> 3278 3288 </tr> … … 3280 3290 <td class="left">200</td> 3281 3291 <td class="left">OK</td> 3282 <td class="left"> <a href="#status.200" id="rfc.xref.status.200.2" title="200 OK">Section 6.3.1</a>3292 <td class="left"> <a href="#status.200" id="rfc.xref.status.200.2" title="200 OK">Section 7.3.1</a> 3283 3293 </td> 3284 3294 </tr> … … 3286 3296 <td class="left">201</td> 3287 3297 <td class="left">Created</td> 3288 <td class="left"> <a href="#status.201" id="rfc.xref.status.201.2" title="201 Created">Section 6.3.2</a>3298 <td class="left"> <a href="#status.201" id="rfc.xref.status.201.2" title="201 Created">Section 7.3.2</a> 3289 3299 </td> 3290 3300 </tr> … … 3292 3302 <td class="left">202</td> 3293 3303 <td class="left">Accepted</td> 3294 <td class="left"> <a href="#status.202" id="rfc.xref.status.202.2" title="202 Accepted">Section 6.3.3</a>3304 <td class="left"> <a href="#status.202" id="rfc.xref.status.202.2" title="202 Accepted">Section 7.3.3</a> 3295 3305 </td> 3296 3306 </tr> … … 3298 3308 <td class="left">203</td> 3299 3309 <td class="left">Non-Authoritative Information</td> 3300 <td class="left"> <a href="#status.203" id="rfc.xref.status.203.2" title="203 Non-Authoritative Information">Section 6.3.4</a>3310 <td class="left"> <a href="#status.203" id="rfc.xref.status.203.2" title="203 Non-Authoritative Information">Section 7.3.4</a> 3301 3311 </td> 3302 3312 </tr> … … 3304 3314 <td class="left">204</td> 3305 3315 <td class="left">No Content</td> 3306 <td class="left"> <a href="#status.204" id="rfc.xref.status.204.2" title="204 No Content">Section 6.3.5</a>3316 <td class="left"> <a href="#status.204" id="rfc.xref.status.204.2" title="204 No Content">Section 7.3.5</a> 3307 3317 </td> 3308 3318 </tr> … … 3310 3320 <td class="left">205</td> 3311 3321 <td class="left">Reset Content</td> 3312 <td class="left"> <a href="#status.205" id="rfc.xref.status.205.2" title="205 Reset Content">Section 6.3.6</a>3322 <td class="left"> <a href="#status.205" id="rfc.xref.status.205.2" title="205 Reset Content">Section 7.3.6</a> 3313 3323 </td> 3314 3324 </tr> … … 3316 3326 <td class="left">300</td> 3317 3327 <td class="left">Multiple Choices</td> 3318 <td class="left"> <a href="#status.300" id="rfc.xref.status.300.2" title="300 Multiple Choices">Section 6.4.1</a>3328 <td class="left"> <a href="#status.300" id="rfc.xref.status.300.2" title="300 Multiple Choices">Section 7.4.1</a> 3319 3329 </td> 3320 3330 </tr> … … 3322 3332 <td class="left">301</td> 3323 3333 <td class="left">Moved Permanently</td> 3324 <td class="left"> <a href="#status.301" id="rfc.xref.status.301.2" title="301 Moved Permanently">Section 6.4.2</a>3334 <td class="left"> <a href="#status.301" id="rfc.xref.status.301.2" title="301 Moved Permanently">Section 7.4.2</a> 3325 3335 </td> 3326 3336 </tr> … … 3328 3338 <td class="left">302</td> 3329 3339 <td class="left">Found</td> 3330 <td class="left"> <a href="#status.302" id="rfc.xref.status.302.2" title="302 Found">Section 6.4.3</a>3340 <td class="left"> <a href="#status.302" id="rfc.xref.status.302.2" title="302 Found">Section 7.4.3</a> 3331 3341 </td> 3332 3342 </tr> … … 3334 3344 <td class="left">303</td> 3335 3345 <td class="left">See Other</td> 3336 <td class="left"> <a href="#status.303" id="rfc.xref.status.303.2" title="303 See Other">Section 6.4.4</a>3346 <td class="left"> <a href="#status.303" id="rfc.xref.status.303.2" title="303 See Other">Section 7.4.4</a> 3337 3347 </td> 3338 3348 </tr> … … 3340 3350 <td class="left">305</td> 3341 3351 <td class="left">Use Proxy</td> 3342 <td class="left"> <a href="#status.305" id="rfc.xref.status.305.2" title="305 Use Proxy">Section 6.4.5</a>3352 <td class="left"> <a href="#status.305" id="rfc.xref.status.305.2" title="305 Use Proxy">Section 7.4.5</a> 3343 3353 </td> 3344 3354 </tr> … … 3346 3356 <td class="left">306</td> 3347 3357 <td class="left">(Unused)</td> 3348 <td class="left"> <a href="#status.306" id="rfc.xref.status.306.1" title="306 (Unused)">Section 6.4.6</a>3358 <td class="left"> <a href="#status.306" id="rfc.xref.status.306.1" title="306 (Unused)">Section 7.4.6</a> 3349 3359 </td> 3350 3360 </tr> … … 3352 3362 <td class="left">307</td> 3353 3363 <td class="left">Temporary Redirect</td> 3354 <td class="left"> <a href="#status.307" id="rfc.xref.status.307.2" title="307 Temporary Redirect">Section 6.4.7</a>3364 <td class="left"> <a href="#status.307" id="rfc.xref.status.307.2" title="307 Temporary Redirect">Section 7.4.7</a> 3355 3365 </td> 3356 3366 </tr> … … 3358 3368 <td class="left">400</td> 3359 3369 <td class="left">Bad Request</td> 3360 <td class="left"> <a href="#status.400" id="rfc.xref.status.400.2" title="400 Bad Request">Section 6.5.1</a>3370 <td class="left"> <a href="#status.400" id="rfc.xref.status.400.2" title="400 Bad Request">Section 7.5.1</a> 3361 3371 </td> 3362 3372 </tr> … … 3364 3374 <td class="left">402</td> 3365 3375 <td class="left">Payment Required</td> 3366 <td class="left"> <a href="#status.402" id="rfc.xref.status.402.2" title="402 Payment Required">Section 6.5.2</a>3376 <td class="left"> <a href="#status.402" id="rfc.xref.status.402.2" title="402 Payment Required">Section 7.5.2</a> 3367 3377 </td> 3368 3378 </tr> … … 3370 3380 <td class="left">403</td> 3371 3381 <td class="left">Forbidden</td> 3372 <td class="left"> <a href="#status.403" id="rfc.xref.status.403.2" title="403 Forbidden">Section 6.5.3</a>3382 <td class="left"> <a href="#status.403" id="rfc.xref.status.403.2" title="403 Forbidden">Section 7.5.3</a> 3373 3383 </td> 3374 3384 </tr> … … 3376 3386 <td class="left">404</td> 3377 3387 <td class="left">Not Found</td> 3378 <td class="left"> <a href="#status.404" id="rfc.xref.status.404.2" title="404 Not Found">Section 6.5.4</a>3388 <td class="left"> <a href="#status.404" id="rfc.xref.status.404.2" title="404 Not Found">Section 7.5.4</a> 3379 3389 </td> 3380 3390 </tr> … … 3382 3392 <td class="left">405</td> 3383 3393 <td class="left">Method Not Allowed</td> 3384 <td class="left"> <a href="#status.405" id="rfc.xref.status.405.2" title="405 Method Not Allowed">Section 6.5.5</a>3394 <td class="left"> <a href="#status.405" id="rfc.xref.status.405.2" title="405 Method Not Allowed">Section 7.5.5</a> 3385 3395 </td> 3386 3396 </tr> … … 3388 3398 <td class="left">406</td> 3389 3399 <td class="left">Not Acceptable</td> 3390 <td class="left"> <a href="#status.406" id="rfc.xref.status.406.2" title="406 Not Acceptable">Section 6.5.6</a>3400 <td class="left"> <a href="#status.406" id="rfc.xref.status.406.2" title="406 Not Acceptable">Section 7.5.6</a> 3391 3401 </td> 3392 3402 </tr> … … 3394 3404 <td class="left">408</td> 3395 3405 <td class="left">Request Timeout</td> 3396 <td class="left"> <a href="#status.408" id="rfc.xref.status.408.2" title="408 Request Timeout">Section 6.5.7</a>3406 <td class="left"> <a href="#status.408" id="rfc.xref.status.408.2" title="408 Request Timeout">Section 7.5.7</a> 3397 3407 </td> 3398 3408 </tr> … … 3400 3410 <td class="left">409</td> 3401 3411 <td class="left">Conflict</td> 3402 <td class="left"> <a href="#status.409" id="rfc.xref.status.409.2" title="409 Conflict">Section 6.5.8</a>3412 <td class="left"> <a href="#status.409" id="rfc.xref.status.409.2" title="409 Conflict">Section 7.5.8</a> 3403 3413 </td> 3404 3414 </tr> … … 3406 3416 <td class="left">410</td> 3407 3417 <td class="left">Gone</td> 3408 <td class="left"> <a href="#status.410" id="rfc.xref.status.410.2" title="410 Gone">Section 6.5.9</a>3418 <td class="left"> <a href="#status.410" id="rfc.xref.status.410.2" title="410 Gone">Section 7.5.9</a> 3409 3419 </td> 3410 3420 </tr> … … 3412 3422 <td class="left">411</td> 3413 3423 <td class="left">Length Required</td> 3414 <td class="left"> <a href="#status.411" id="rfc.xref.status.411.2" title="411 Length Required">Section 6.5.10</a>3424 <td class="left"> <a href="#status.411" id="rfc.xref.status.411.2" title="411 Length Required">Section 7.5.10</a> 3415 3425 </td> 3416 3426 </tr> … … 3418 3428 <td class="left">413</td> 3419 3429 <td class="left">Request Representation Too Large</td> 3420 <td class="left"> <a href="#status.413" id="rfc.xref.status.413.2" title="413 Request Representation Too Large">Section 6.5.11</a>3430 <td class="left"> <a href="#status.413" id="rfc.xref.status.413.2" title="413 Request Representation Too Large">Section 7.5.11</a> 3421 3431 </td> 3422 3432 </tr> … … 3424 3434 <td class="left">414</td>