<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?>
<!-- generated by https://github.com/cabo/kramdown-rfc2629 version 1.2.13 -->
<?rfc toc="yes"?>
<?rfc sortrefs="yes"?>
<?rfc symrefs="yes"?>
<?rfc-ext html-pretty-print="prettyprint https://cdn.rawgit.com/google/code-prettify/master/loader/run_prettify.js"?>
<rfc xmlns:x="http://purl.org/net/xml2rfc/ext"
     category="std"
     docName="draft-ietf-httpbis-proxy-status-01"
     ipr="trust200902"
     submissionType="IETF">
   <x:feedback template="mailto:quic@ietf.org?subject={docname},%20%22{section}%22\&amp;amp;body=%3c{ref}%3e:"/>
   <front>
      <title abbrev="Proxy-Status">The Proxy-Status HTTP Response Header Field</title>
      <author fullname="Mark Nottingham" initials="M." surname="Nottingham">
         <organization>Fastly</organization>
         <address>
            <email>mnot@mnot.net</email>
            <uri>https://www.mnot.net/</uri>
         </address>
      </author>
      <author fullname="Piotr Sikora" initials="P." surname="Sikora">
         <organization>Google</organization>
         <address>
            <email>piotrsikora@google.com</email>
         </address>
      </author>
      <date year="2020" month="March" day="1"/>
      <area>Applications and Real-Time</area>
      <workgroup>HTTP</workgroup>
      <keyword>Internet-Draft</keyword>
      <abstract>
         <t>This document defines the Proxy-Status HTTP header field to convey the details of intermediary handling of responses, including generated errors.</t>
      </abstract>
      <note title="Note to Readers">
         <t>
            <spanx>RFC EDITOR: please remove this section before publication</spanx>
         </t>
         <t>Discussion of this draft takes place on the HTTP working group mailing list (ietf-http-wg@w3.org), which is archived at <eref target="https://lists.w3.org/Archives/Public/ietf-http-wg/">https://lists.w3.org/Archives/Public/ietf-http-wg/</eref>.</t>
         <t>Working Group information can be found at <eref target="https://httpwg.org/">https://httpwg.org/</eref>; source code and issues list for this draft can be found at <eref target="https://github.com/httpwg/http-extensions/labels/proxy-status">https://github.com/httpwg/http-extensions/labels/proxy-status</eref>.</t>
      </note>
   </front>
   <middle>
      <section anchor="introduction" title="Introduction">
         <t>HTTP intermediaries – including both forward proxies and gateways (also known as “reverse proxies”) – have become an increasingly significant part of HTTP deployments. In particular, reverse proxies and Content Delivery Networks (CDNs) form part of the critical infrastructure of many Web sites.</t>
         <t>Typically, HTTP intermediaries forward requests towards the origin server and then forward their responses back to clients. However, if an error occurs, the response is generated by the intermediary itself.</t>
         <t>HTTP accommodates these types of errors with a few status codes; for example, 502 Bad Gateway and 504 Gateway Timeout. However, experience has shown that more information is necessary to aid debugging and communicate what’s happened to the client.</t>
         <t>Additionally, intermediaries sometimes want to convey additional information about their handling of a response, even if they did not generate it.</t>
         <t>To enable these uses, <xref target="header"/> defines a new HTTP response header field to allow intermediaries to convey details of their handling of a response, and <xref target="types"/> defines a set of Proxy Error Types for use when a proxy generates the response. <xref target="register"/> explains how to define new Proxy Error Types.</t>
         <section anchor="notational-conventions" title="Notational Conventions">
            <t>The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “NOT RECOMMENDED”, “MAY”, and “OPTIONAL” in this document are to be interpreted as described in BCP 14 <xref target="RFC2119"/>
               <xref target="RFC8174"/> when, and only when, they appear in all capitals, as shown here.</t>
            <t>This specification uses Structured Headers <xref target="I-D.ietf-httpbis-header-structure"/> to specify syntax. The terms sh-param-list, sh-item, sh-string, sh-token and sh-integer refer to the structured types defined therein.</t>
            <t>Note that in this specification, “proxy” is used to indicate both forward and reverse proxies, otherwise known as gateways. “Next hop” indicates the connection in the direction leading to the origin server for the request.</t>
         </section>
      </section>
      <section anchor="header" title="The Proxy-Status HTTP Header Field">
         <t>The Proxy-Status HTTP response header field allows an intermediary to convey additional information about its handling of a response and its associated request.</t>
         <t>It is a Structured Headers <xref target="I-D.ietf-httpbis-header-structure"/> List of parameterised Tokens:</t>
         <figure>
            <artwork type="abnf">
Cache-Status   = sh-list
</artwork>
         </figure>
         <t>Each member of the list represents an intermediary that has handled the response. The first member of the list represents the intermediary closest to the origin server, and the last member of the list represents the intermediary closest to the user agent.</t>
         <t>For example:</t>
         <figure>
            <artwork type="example">
Proxy-Status: FooProxy, ExampleCDN
</artwork>
         </figure>
         <t>indicates that this response was handled first by FooAccelerator and then ExampleCDN.</t>
         <t>Parameters on each member convey additional information about that intermediary’s handling of the response; see <xref target="params"/> for defined parameters.</t>
         <t>Intermediaries determine when it is appropriate to add the Proxy-Status header field to a response. Some might decide to add it to all responses, whereas others might only do so when specifically configured to, or when the request contains a header that activates a debugging mode.</t>
         <t>When adding a value to the Proxy-Status header field, intermediaries SHOULD preserve the existing contents of the header, to allow debugging of the entire chain of intermediaries handling the request.</t>
         <t>The list members identify the intermediary that inserted the value, and MUST have a type of either sh-string or sh-token. Depending on the deployment, this might be a product or service name (e.g., ExampleProxy or “Example CDN”), a hostname (“proxy-3.example.com”), and IP address, or a generated string.</t>
         <t>Each member of the list can also have a number of parameters that describe that intermediary’s handling of the request. While all of these parameters are OPTIONAL, intermediaries are encouraged to provide as much information as possible.</t>
         <t>Proxy-Status MAY be sent in HTTP trailers, but – as with all trailers – it might be silently discarded along the path to the user agent, so this SHOULD NOT be done unless it is not possible to send it in headers. For example, if an intermediary is streaming a response and the upstream connection suddenly terminates, Proxy-Status can be appended to the trailers of the outgoing message (since the headers have already been sent).</t>
         <t>Note that there are various security considerations for intermediaries using the Proxy-Status header field; see <xref target="security"/>.</t>
         <t>Origin servers MUST NOT generate the Proxy-Status header field.</t>
         <section anchor="params" title="Proxy-Status Parameters">
            <t>This section lists parameters that can be used on the members of Proxy-Status.</t>
            <section anchor="origin" title="origin">
               <t>The <spanx style="verb">origin</spanx> parameter’s value is a sh-string or sh-token that identifies the origin server selected (and used, if contacted) for this response. Its contents might be a hostname, IP address, or alias.</t>
               <t>This is most useful for gateways (also known as “reverse proxies”), since they are often configured to use an origin server other than that which appears in the URL, and sometimes they use several origins to serve a given site.</t>
               <t>For example:</t>
               <figure>
                  <artwork type="example">
Proxy-Status: cdn.example.org; origin=backend.example.org
</artwork>
               </figure>
            </section>
            <section anchor="fwd-protocol" title="fwd-protocol">
               <t>The <spanx style="verb">fwd-protocol</spanx> parameter’s value is a sh-token indicating the ALPN protocol identifier <xref target="RFC7301"/> used by the intermediary to connect to the next hop. This is only applicable when that connection was actually established.</t>
               <t>For example:</t>
               <figure>
                  <artwork type="example">
Proxy-Status: "proxy.example.org"; fwd-protocol=h2
</artwork>
               </figure>
            </section>
            <section anchor="error" title="error">
               <t>The <spanx style="verb">error</spanx> parameter’s value is a sh-token that is a Proxy Error Type. When present, it indicates that the response was generated by the proxy, not the origin server or any other upstream server.</t>
               <t>
                  <xref target="types"/> lists the Proxy Error Types defined in this document; new ones can be defined using the procedure outlined in <xref target="register"/>.</t>
               <t>For example:</t>
               <figure>
                  <artwork type="example">
HTTP/1.1 504 Gateway Timeout
Proxy-Status: SomeCDN; error=connection_timeout
</artwork>
               </figure>
               <t>indicates that this 504 response was generated by SomeCDN, due to a connection timeout when going forward.</t>
               <t>Or:</t>
               <figure>
                  <artwork type="example">
HTTP/1.1 429 Too Many Requests
Proxy-Status: SomeReverseProxy; error=http_request_error
</artwork>
               </figure>
               <t>indicates that this 429 Too Many Requests response was generated by the intermediary, not the origin.</t>
               <t>Each Proxy Error Type has a Recommended HTTP Status Code. When generating a HTTP response containing <spanx style="verb">error</spanx>, its HTTP status code SHOULD be set to the Recommended HTTP Status Code. However, there may be circumstances (e.g., for backwards compatibility with previous behaviours) when another status code might be used.</t>
            </section>
            <section anchor="details" title="details">
               <t>The <spanx style="verb">details</spanx> parameter’s value is a sh-string containing additional information not captured anywhere else. This can include implementation-specific or deployment-specific information.</t>
               <t>For example:</t>
               <figure>
                  <artwork type="example">
Proxy-Status: ExampleProxy; error="http_protocol_error";
              details="Malformed response header - space before colon"
</artwork>
               </figure>
            </section>
         </section>
         <section anchor="types" title="Proxy Error Types">
            <t>This section lists the Proxy Error Types defined by this document. See <xref target="register"/> for information about defining new Proxy Error Types.</t>
            <section anchor="dns-timeout" title="DNS Timeout">
               <t>
                  <list style="symbols">
                     <t>Name: dns_timeout</t>
                     <t>Description: The intermediary encountered a timeout when trying to find an IP address for the next hop hostname.</t>
                     <t>Extra Parameters: None.</t>
                     <t>Recommended HTTP status code: 504</t>
                  </list>
               </t>
            </section>
            <section anchor="dns-error" title="DNS Error">
               <t>
                  <list style="symbols">
                     <t>Name: dns_error</t>
                     <t>Description: The intermediary encountered a DNS error when trying to find an IP address for the next hop hostname.</t>
                     <t>Extra Parameters: <list style="symbols">
                           <t>rcode: A sh-string conveying the DNS RCODE that indicates the error type. See <xref target="RFC8499" x:fmt="," x:sec="3"/>.</t>
                        </list>
                     </t>
                     <t>Recommended HTTP status code: 502</t>
                  </list>
               </t>
            </section>
            <section anchor="destination-not-found" title="Destination Not Found">
               <t>
                  <list style="symbols">
                     <t>Name: destination_not_found</t>
                     <t>Description: The intermediary cannot determine the appropriate next hop to use for this request; for example, it may not be configured. Note that this error is specific to gateways, which typically require specific configuration to identify the “backend” server; forward proxies use in-band information to identify the origin server.</t>
                     <t>Extra Parameters: None.</t>
                     <t>Recommended HTTP status code: 500</t>
                  </list>
               </t>
            </section>
            <section anchor="destination-unavailable" title="Destination Unavailable">
               <t>
                  <list style="symbols">
                     <t>Name: destination_unavailable</t>
                     <t>Description: The intermediary considers the next hop to be unavailable; e.g., recent attempts to communicate with it may have failed, or a health check may indicate that it is down.</t>
                     <t>Extra Parameters: None.</t>
                     <t>Recommended HTTP status code: 503</t>
                  </list>
               </t>
            </section>
            <section anchor="destination-ip-prohibited" title="Destination IP Prohibited">
               <t>
                  <list style="symbols">
                     <t>Name: destination_ip_prohibited</t>
                     <t>Description: The intermediary is configured to prohibit connections to the next hop IP address.</t>
                     <t>Extra Parameters: None.</t>
                     <t>Recommended HTTP status code: 502</t>
                  </list>
               </t>
            </section>
            <section anchor="destination-ip-unroutable" title="Destination IP Unroutable">
               <t>
                  <list style="symbols">
                     <t>Name: destination_ip_unroutable</t>
                     <t>Description: The intermediary cannot find a route to the next hop IP address.</t>
                     <t>Extra Parameters: None.</t>
                     <t>Recommended HTTP status code: 502</t>
                  </list>
               </t>
            </section>
            <section anchor="connection-refused" title="Connection Refused">
               <t>
                  <list style="symbols">
                     <t>Name: connection_refused</t>
                     <t>Description: The intermediary’s connection to the next hop was refused.</t>
                     <t>Extra Parameters: None.</t>
                     <t>Recommended HTTP status code: 502</t>
                  </list>
               </t>
            </section>
            <section anchor="connection-terminated" title="Connection Terminated">
               <t>
                  <list style="symbols">
                     <t>Name: connection_terminated</t>
                     <t>Description: The intermediary’s connection to the next hop was closed before any part of the response was received. If some part was received, see http_response_incomplete.</t>
                     <t>Extra Parameters: None.</t>
                     <t>Recommended HTTP status code: 502</t>
                  </list>
               </t>
            </section>
            <section anchor="connection-timeout" title="Connection Timeout">
               <t>
                  <list style="symbols">
                     <t>Name: connection_timeout</t>
                     <t>Description: The intermediary’s attempt to open a connection to the next hop timed out.</t>
                     <t>Extra Parameters: None.</t>
                     <t>Recommended HTTP status code: 504</t>
                  </list>
               </t>
            </section>
            <section anchor="connection-read-timeout" title="Connection Read Timeout">
               <t>
                  <list style="symbols">
                     <t>Name: connection_read_timeout</t>
                     <t>Description: The intermediary was expecting data on a connection (e.g., part of a response), but did not receive any new data in a configured time limit.</t>
                     <t>Extra Parameters: None.</t>
                     <t>Recommended HTTP status code: 504</t>
                  </list>
               </t>
            </section>
            <section anchor="connection-write-timeout" title="Connection Write Timeout">
               <t>
                  <list style="symbols">
                     <t>Name: connection_write_timeout</t>
                     <t>Description: The intermediary was attempting to write data to a connection, but was not able to (e.g., because its buffers were full).</t>
                     <t>Extra Parameters: None.</t>
                     <t>Recommended HTTP status code: 504</t>
                  </list>
               </t>
            </section>
            <section anchor="connection-limit-reached" title="Connection Limit Reached">
               <t>
                  <list style="symbols">
                     <t>Name: connnection_limit_reached</t>
                     <t>Description: The intermediary is configured to limit the number of connections it has to the next hop, and that limit has been passed.</t>
                     <t>Extra Parameters: None.</t>
                     <t>Recommended HTTP status code: 503</t>
                  </list>
               </t>
            </section>
            <section anchor="http-incomplete-response" title="HTTP Incomplete Response">
               <t>
                  <list style="symbols">
                     <t>Name: http_response_incomplete</t>
                     <t>Description: The intermediary received an incomplete response to the request from the next hop.</t>
                     <t>Extra Parameters: None.</t>
                     <t>Recommended HTTP status code: 502</t>
                  </list>
               </t>
            </section>
            <section anchor="http-protocol-error" title="HTTP Protocol Error">
               <t>
                  <list style="symbols">
                     <t>Name: http_protocol_error</t>
                     <t>Description: The intermediary encountered a HTTP protocol error when communicating with the next hop. This error should only be used when a more specific one is not defined.</t>
                     <t>Extra Parameters: None.</t>
                     <t>Recommended HTTP status code: 502</t>
                  </list>
               </t>
            </section>
            <section anchor="http-response-header-block-too-large"
                     title="HTTP Response Header Block Too Large">
               <t>
                  <list style="symbols">
                     <t>Name: http_response_header_block_size</t>
                     <t>Description: The intermediary received a response to the request whose header block was considered too large.</t>
                     <t>Extra Parameters: <list style="symbols">
                           <t>header_block_size: a sh-integer indicating how large the headers received were. Note that they might not be complete; i.e., the intermediary may have discarded or refused additional data.</t>
                        </list>
                     </t>
                     <t>Recommended HTTP status code: 502</t>
                  </list>
               </t>
            </section>
            <section anchor="http-response-header-too-large"
                     title="HTTP Response Header Too Large">
               <t>
                  <list style="symbols">
                     <t>Name: http_response_header_size</t>
                     <t>Description: The intermediary received a response to the request containing an individual header line that was considered too large.</t>
                     <t>Extra Parameters: <list style="symbols">
                           <t>header_name: a sh-string indicating the name of the header that triggered the error.</t>
                        </list>
                     </t>
                     <t>Recommended HTTP status code: 502</t>
                  </list>
               </t>
            </section>
            <section anchor="http-response-body-too-large"
                     title="HTTP Response Body Too Large">
               <t>
                  <list style="symbols">
                     <t>Name: http_response_body_size</t>
                     <t>Description: The intermediary received a response to the request whose body was considered too large.</t>
                     <t>Extra Parameters: <list style="symbols">
                           <t>body_size: a sh-integer indicating how large the body received was. Note that it may not have been complete; i.e., the intermediary may have discarded or refused additional data.</t>
                        </list>
                     </t>
                     <t>Recommended HTTP status code: 502</t>
                  </list>
               </t>
            </section>
            <section anchor="http-response-transfer-coding-error"
                     title="HTTP Response Transfer-Coding Error">
               <t>
                  <list style="symbols">
                     <t>Name: http_response_transfer_coding</t>
                     <t>Description: The intermediary encountered an error decoding the transfer-coding of the response.</t>
                     <t>Extra Parameters: <list style="symbols">
                           <t>coding: a sh-token containing the specific coding that caused the error.</t>
                        </list>
                     </t>
                     <t>Recommended HTTP status code: 502</t>
                  </list>
               </t>
            </section>
            <section anchor="http-response-content-coding-error"
                     title="HTTP Response Content-Coding Error">
               <t>
                  <list style="symbols">
                     <t>Name: http_response_content_coding</t>
                     <t>Description: The intermediary encountered an error decoding the content-coding of the response.</t>
                     <t>Extra Parameters: <list style="symbols">
                           <t>coding: a sh-token containing the specific coding that caused the error.</t>
                        </list>
                     </t>
                     <t>Recommended HTTP status code: 502</t>
                  </list>
               </t>
            </section>
            <section anchor="http-response-timeout" title="HTTP Response Timeout">
               <t>
                  <list style="symbols">
                     <t>Name: http_response_timeout</t>
                     <t>Description: The intermediary reached a configured time limit waiting for the complete response.</t>
                     <t>Extra Parameters: None.</t>
                     <t>Recommended HTTP status code: 504</t>
                  </list>
               </t>
            </section>
            <section anchor="tls-handshake-error" title="TLS Handshake Error">
               <t>
                  <list style="symbols">
                     <t>Name: tls_handshake_error</t>
                     <t>Description: The intermediary encountered an error during TLS handshake with the next hop.</t>
                     <t>Extra Parameters: <list style="symbols">
                           <t>alert_message: a sh-token containing the applicable description string from the TLS Alerts registry.</t>
                        </list>
                     </t>
                     <t>Recommended HTTP status code: 502</t>
                  </list>
               </t>
            </section>
            <section anchor="tls-untrusted-peer-certificate"
                     title="TLS Untrusted Peer Certificate">
               <t>
                  <list style="symbols">
                     <t>Name: tls_untrusted_peer_certificate</t>
                     <t>Description: The intermediary received an untrusted peer certificate during TLS handshake with the next hop.</t>
                     <t>Extra Parameters: None.</t>
                     <t>Recommended HTTP status code: 502</t>
                  </list>
               </t>
            </section>
            <section anchor="tls-expired-peer-certificate"
                     title="TLS Expired Peer Certificate">
               <t>
                  <list style="symbols">
                     <t>Name: tls_expired_peer_certificate</t>
                     <t>Description: The intermediary received an expired peer certificate during TLS handshake with the next hop.</t>
                     <t>Extra Parameters: None.</t>
                     <t>Recommended HTTP status code: 502</t>
                  </list>
               </t>
            </section>
            <section anchor="tls-unexpected-peer-certificate"
                     title="TLS Unexpected Peer Certificate">
               <t>
                  <list style="symbols">
                     <t>Name: tls_unexpected_peer_certificate</t>
                     <t>Description: The intermediary received an unexpected peer certificate (e.g., SPKI doesn’t match) during the TLS handshake with the next hop.</t>
                     <t>Extra Parameters: <list style="symbols">
                           <t>identity: a sh-string containing a comma-separated list of Subject Alternative Names from the certificate received from the next hop.</t>
                           <t>sha256: a sh-string containing the hex-encoded SHA-256 of the certificate received from the next hop.</t>
                           <t>spki: a sh-string containing the base64-encoded SHA-256 of the Subject Public Key Info (SPKI) from the certificate received from the next hop.</t>
                        </list>
                     </t>
                     <t>Recommended HTTP status code: 502</t>
                  </list>
               </t>
            </section>
            <section anchor="tls-missing-proxy-certificate"
                     title="TLS Missing Proxy Certificate">
               <t>
                  <list style="symbols">
                     <t>Name: tls_missing_proxy_certificate</t>
                     <t>Description: The next hop requested a client certificate from the intermediary during TLS handshake, but it wasn’t configured with one.</t>
                     <t>Extra Parameters: None.</t>
                     <t>Recommended HTTP status code: 500</t>
                  </list>
               </t>
            </section>
            <section anchor="tls-rejected-proxy-certificate"
                     title="TLS Rejected Proxy Certificate">
               <t>
                  <list style="symbols">
                     <t>Name: tls_rejected_proxy_certificate</t>
                     <t>Description: The next hop rejected the client certificate provided by the intermediary during TLS handshake.</t>
                     <t>Extra Parameters: None.</t>
                     <t>Recommended HTTP status code: 500</t>
                  </list>
               </t>
            </section>
            <section anchor="tls-error" title="TLS Error">
               <t>
                  <list style="symbols">
                     <t>Name: tls_error</t>
                     <t>Description: The intermediary encountered a TLS error when communicating with the next hop.</t>
                     <t>Extra Parameters: <list style="symbols">
                           <t>alert_message: a sh-token containing the applicable description string from the TLS Alerts registry.</t>
                        </list>
                     </t>
                     <t>Recommended HTTP status code: 502</t>
                  </list>
               </t>
            </section>
            <section anchor="http-request-error" title="HTTP Request Error">
               <t>
                  <list style="symbols">
                     <t>Name: http_request_error</t>
                     <t>Description: The intermediary is generating a client (4xx) response on the origin’s behalf. Applicable status codes include (but are not limited to) 400, 403, 405, 406, 408, 411, 413, 414, 415, 416, 417, 429.</t>
                     <t>Extra Parameters: <list style="symbols">
                           <t>status_code: a sh-integer containing the generated status code.</t>
                           <t>status_phrase: a sh-string containing the generated status phrase.</t>
                        </list>
                     </t>
                     <t>Recommended HTTP status code: The applicable 4xx status code</t>
                  </list>
               </t>
               <t>This type helps distinguish between responses generated by intermediaries from those generated by the origin.</t>
            </section>
            <section anchor="http-request-denied" title="HTTP Request Denied">
               <t>
                  <list style="symbols">
                     <t>Name: http_request_denied</t>
                     <t>Description: The intermediary rejected the HTTP request based on its configuration and/or policy settings. The request wasn’t forwarded to the next hop.</t>
                     <t>Extra Parameters: None.</t>
                     <t>Recommended HTTP status code: 400</t>
                  </list>
               </t>
            </section>
            <section anchor="http-upgrade-failed" title="HTTP Upgrade Failed">
               <t>
                  <list style="symbols">
                     <t>Name: http_upgrade_failed</t>
                     <t>Description: The HTTP Upgrade between the intermediary and the next hop failed.</t>
                     <t>Extra Parameters: None.</t>
                     <t>Recommended HTTP status code: 502</t>
                  </list>
               </t>
            </section>
            <section anchor="proxy-internal-response" title="Proxy Internal Response">
               <t>
                  <list style="symbols">
                     <t>Name: proxy_internal_response</t>
                     <t>Description: The intermediary generated the response locally, without attempting to connect to the next hop (e.g. in response to a request to a debug endpoint terminated at the intermediary).</t>
                     <t>Extra Parameters: None.</t>
                     <t>Recommended HTTP status code:</t>
                  </list>
               </t>
            </section>
            <section anchor="proxy-internal-error" title="Proxy Internal Error">
               <t>
                  <list style="symbols">
                     <t>Name: proxy_internal_error</t>
                     <t>Description: The intermediary encountered an internal error unrelated to the origin.</t>
                     <t>Extra Parameters: <list style="symbols">
                           <t>error: a sh-string containing details about the error condition.</t>
                        </list>
                     </t>
                     <t>Recommended HTTP status code: 500</t>
                  </list>
               </t>
            </section>
            <section anchor="proxy-loop-detected" title="Proxy Loop Detected">
               <t>
                  <list style="symbols">
                     <t>Name: proxy_loop_detected</t>
                     <t>Description: The intermediary tried to forward the request to itself, or a loop has been detected using different means (e.g. <xref target="RFC8586"/>).</t>
                     <t>Extra Parameters: None.</t>
                     <t>Recommended HTTP status code: 502</t>
                  </list>
               </t>
            </section>
         </section>
         <section anchor="register" title="Defining New Proxy Error Types">
            <t>New Proxy Error Types can be defined by registering them in the HTTP Proxy Error Types registry.</t>
            <t>Registration requests are reviewed and approved by a Designated Expert, as per <xref target="RFC8126" x:fmt="," x:sec="4.5"/>. A specification document is appreciated, but not required.</t>
            <t>The Expert(s) should consider the following factors when evaluating requests:</t>
            <t>
               <list style="symbols">
                  <t>Community feedback</t>
                  <t>If the value is sufficiently well-defined</t>
                  <t>If the value is generic; vendor-specific, application-specific and deployment-specific values are discouraged</t>
               </list>
            </t>
            <t>Registration requests should use the following template:</t>
            <t>
               <list style="symbols">
                  <t>Name: [a name for the Proxy Error Type that is matches sh-token]</t>
                  <t>Description: [a description of the conditions that generate the Proxy Error Type]</t>
                  <t>Extra Parameters: [zero or more optional parameters, along with their allowable type(s)]</t>
                  <t>Recommended HTTP status code: [the appropriate HTTP status code for this entry]</t>
               </list>
            </t>
            <t>See the registry at <eref target="https://iana.org/assignments/http-proxy-statuses">https://iana.org/assignments/http-proxy-statuses</eref> for details on where to send registration requests.</t>
         </section>
      </section>
      <section anchor="iana-considerations" title="IANA Considerations">
         <t>Upon publication, please create the HTTP Proxy Error Types registry at <eref target="https://iana.org/assignments/http-proxy-statuses">https://iana.org/assignments/http-proxy-statuses</eref> and populate it with the types defined in <xref target="types"/>; see <xref target="register"/> for its associated procedures.</t>
      </section>
      <section anchor="security" title="Security Considerations">
         <t>One of the primary security concerns when using Proxy-Status is leaking information that might aid an attacker. For example, information about the intermediary’s configuration and back-end topology can be exposed.</t>
         <t>As a result, care needs to be taken when deciding to generate a Proxy-Status header. Note that intermediaries are not required to generate a Proxy-Status header field in any response, and can conditionally generate them based upon request attributes (e.g., authentication tokens, IP address).</t>
         <t>Likewise, generation of all parameters is optional.</t>
      </section>
   </middle>
   <back>
      <references title="Normative References">
         <reference anchor="RFC2119">
            <front>
               <title>Key words for use in RFCs to Indicate Requirement Levels</title>
               <author fullname="S. Bradner" initials="S." surname="Bradner"/>
               <date month="March" year="1997"/>
            </front>
            <seriesInfo name="BCP" value="14"/>
            <seriesInfo name="RFC" value="2119"/>
            <seriesInfo name="DOI" value="10.17487/RFC2119"/>
         </reference>
         <reference anchor="RFC8174">
            <front>
               <title>Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words</title>
               <author fullname="B. Leiba" initials="B." surname="Leiba"/>
               <date month="May" year="2017"/>
            </front>
            <seriesInfo name="BCP" value="14"/>
            <seriesInfo name="RFC" value="8174"/>
            <seriesInfo name="DOI" value="10.17487/RFC8174"/>
         </reference>
         <reference anchor="I-D.ietf-httpbis-header-structure">
            <front>
               <title>Structured Headers for HTTP</title>
               <author fullname="Mark Nottingham" initials="M" surname="Nottingham"/>
               <author fullname="Poul-Henning Kamp" initials="P" surname="Kamp"/>
               <date day="28" month="January" year="2020"/>
            </front>
            <seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-header-structure-15"/>
         </reference>
         <reference anchor="RFC7301">
            <front>
               <title>Transport Layer Security (TLS) Application-Layer Protocol Negotiation Extension</title>
               <author fullname="S. Friedl" initials="S." surname="Friedl"/>
               <author fullname="A. Popov" initials="A." surname="Popov"/>
               <author fullname="A. Langley" initials="A." surname="Langley"/>
               <author fullname="E. Stephan" initials="E." surname="Stephan"/>
               <date month="July" year="2014"/>
            </front>
            <seriesInfo name="RFC" value="7301"/>
            <seriesInfo name="DOI" value="10.17487/RFC7301"/>
         </reference>
         <reference anchor="RFC8499">
            <front>
               <title>DNS Terminology</title>
               <author fullname="P. Hoffman" initials="P." surname="Hoffman"/>
               <author fullname="A. Sullivan" initials="A." surname="Sullivan"/>
               <author fullname="K. Fujiwara" initials="K." surname="Fujiwara"/>
               <date month="January" year="2019"/>
            </front>
            <seriesInfo name="BCP" value="219"/>
            <seriesInfo name="RFC" value="8499"/>
            <seriesInfo name="DOI" value="10.17487/RFC8499"/>
         </reference>
         <reference anchor="RFC8126">
            <front>
               <title>Guidelines for Writing an IANA Considerations Section in RFCs</title>
               <author fullname="M. Cotton" initials="M." surname="Cotton"/>
               <author fullname="B. Leiba" initials="B." surname="Leiba"/>
               <author fullname="T. Narten" initials="T." surname="Narten"/>
               <date month="June" year="2017"/>
            </front>
            <seriesInfo name="BCP" value="26"/>
            <seriesInfo name="RFC" value="8126"/>
            <seriesInfo name="DOI" value="10.17487/RFC8126"/>
         </reference>
      </references>
      <references title="Informative References">
         <reference anchor="RFC8586">
            <front>
               <title>Loop Detection in Content Delivery Networks (CDNs)</title>
               <author fullname="S. Ludin" initials="S." surname="Ludin"/>
               <author fullname="M. Nottingham" initials="M." surname="Nottingham"/>
               <author fullname="N. Sullivan" initials="N." surname="Sullivan"/>
               <date month="April" year="2019"/>
            </front>
            <seriesInfo name="RFC" value="8586"/>
            <seriesInfo name="DOI" value="10.17487/RFC8586"/>
         </reference>
      </references>
   </back>
</rfc>
