The Proxy-Status HTTP Response Header Field
draft-ietf-httpbis-proxy-status-02

The information below is for an old version of the document
Document Type Active Internet-Draft (httpbis WG)
Authors Mark Nottingham  , Piotr Sikora 
Last updated 2020-08-11
Replaces draft-nottingham-proxy-status
Stream Internet Engineering Task Force (IETF)
Formats plain text xml pdf htmlized bibtex
Reviews
Stream WG state WG Document (wg milestone: - Submit Proxy-Status ... )
Document shepherd No shepherd assigned
IESG IESG state I-D Exists
Consensus Boilerplate Unknown
Telechat date
Responsible AD (None)
Send notices to (None)
HTTP                                                       M. Nottingham
Internet-Draft                                                    Fastly
Intended status: Standards Track                               P. Sikora
Expires: February 12, 2021                                        Google
                                                         August 11, 2020

              The Proxy-Status HTTP Response Header Field
                   draft-ietf-httpbis-proxy-status-02

Abstract

   This document defines the Proxy-Status HTTP field to convey the
   details of intermediary handling of responses, including generated
   errors.

Note to Readers

   _RFC EDITOR: please remove this section before publication_

   Discussion of this draft takes place on the HTTP working group
   mailing list (ietf-http-wg@w3.org), which is archived at
   https://lists.w3.org/Archives/Public/ietf-http-wg/ [1].

   Working Group information can be found at https://httpwg.org/ [2];
   source code and issues list for this draft can be found at
   https://github.com/httpwg/http-extensions/labels/proxy-status [3].

Status of This Memo

   This Internet-Draft is submitted in full conformance with the
   provisions of BCP 78 and BCP 79.

   Internet-Drafts are working documents of the Internet Engineering
   Task Force (IETF).  Note that other groups may also distribute
   working documents as Internet-Drafts.  The list of current Internet-
   Drafts is at https://datatracker.ietf.org/drafts/current/.

   Internet-Drafts are draft documents valid for a maximum of six months
   and may be updated, replaced, or obsoleted by other documents at any
   time.  It is inappropriate to use Internet-Drafts as reference
   material or to cite them other than as "work in progress."

   This Internet-Draft will expire on February 12, 2021.

Nottingham & Sikora     Expires February 12, 2021               [Page 1]
Internet-Draft                Proxy-Status                   August 2020

Copyright Notice

   Copyright (c) 2020 IETF Trust and the persons identified as the
   document authors.  All rights reserved.

   This document is subject to BCP 78 and the IETF Trust's Legal
   Provisions Relating to IETF Documents
   (https://trustee.ietf.org/license-info) in effect on the date of
   publication of this document.  Please review these documents
   carefully, as they describe your rights and restrictions with respect
   to this document.  Code Components extracted from this document must
   include Simplified BSD License text as described in Section 4.e of
   the Trust Legal Provisions and are provided without warranty as
   described in the Simplified BSD License.

Table of Contents

   1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . .   3
     1.1.  Notational Conventions  . . . . . . . . . . . . . . . . .   4
   2.  The Proxy-Status HTTP Field . . . . . . . . . . . . . . . . .   4
     2.1.  Proxy-Status Parameters . . . . . . . . . . . . . . . . .   5
       2.1.1.  next-hop  . . . . . . . . . . . . . . . . . . . . . .   5
       2.1.2.  next-protocol . . . . . . . . . . . . . . . . . . . .   5
       2.1.3.  error . . . . . . . . . . . . . . . . . . . . . . . .   6
       2.1.4.  details . . . . . . . . . . . . . . . . . . . . . . .   7
     2.2.  Defining New Proxy-Status Parameters  . . . . . . . . . .   7
     2.3.  Proxy Error Types . . . . . . . . . . . . . . . . . . . .   8
       2.3.1.  DNS Timeout . . . . . . . . . . . . . . . . . . . . .   8
       2.3.2.  DNS Error . . . . . . . . . . . . . . . . . . . . . .   8
       2.3.3.  Destination Not Found . . . . . . . . . . . . . . . .   8
       2.3.4.  Destination Unavailable . . . . . . . . . . . . . . .   9
       2.3.5.  Destination IP Prohibited . . . . . . . . . . . . . .   9
       2.3.6.  Destination IP Unroutable . . . . . . . . . . . . . .   9
       2.3.7.  Connection Refused  . . . . . . . . . . . . . . . . .   9
       2.3.8.  Connection Terminated . . . . . . . . . . . . . . . .  10
       2.3.9.  Connection Timeout  . . . . . . . . . . . . . . . . .  10
       2.3.10. Connection Read Timeout . . . . . . . . . . . . . . .  10
       2.3.11. Connection Write Timeout  . . . . . . . . . . . . . .  10
       2.3.12. Connection Limit Reached  . . . . . . . . . . . . . .  11
       2.3.13. TLS Protocol Error  . . . . . . . . . . . . . . . . .  11
       2.3.14. TLS Certificate Error . . . . . . . . . . . . . . . .  11
       2.3.15. TLS Alert Received  . . . . . . . . . . . . . . . . .  11
       2.3.16. HTTP Request Error  . . . . . . . . . . . . . . . . .  12
       2.3.17. HTTP Request Denied . . . . . . . . . . . . . . . . .  12
       2.3.18. HTTP Incomplete Response  . . . . . . . . . . . . . .  12
       2.3.19. HTTP Response Header Block Too Large  . . . . . . . .  13
       2.3.20. HTTP Response Header Too Large  . . . . . . . . . . .  13
       2.3.21. HTTP Response Body Too Large  . . . . . . . . . . . .  13

Nottingham & Sikora     Expires February 12, 2021               [Page 2]
Internet-Draft                Proxy-Status                   August 2020

       2.3.22. HTTP Response Transfer-Coding Error . . . . . . . . .  14
       2.3.23. HTTP Response Content-Coding Error  . . . . . . . . .  14
       2.3.24. HTTP Response Timeout . . . . . . . . . . . . . . . .  14
       2.3.25. HTTP Upgrade Failed . . . . . . . . . . . . . . . . .  14
       2.3.26. HTTP Protocol Error . . . . . . . . . . . . . . . . .  15
       2.3.27. Proxy Internal Response . . . . . . . . . . . . . . .  15
       2.3.28. Proxy Internal Error  . . . . . . . . . . . . . . . .  15
       2.3.29. Proxy Configuration Error . . . . . . . . . . . . . .  15
       2.3.30. Proxy Loop Detected . . . . . . . . . . . . . . . . .  16
     2.4.  Defining New Proxy Error Types  . . . . . . . . . . . . .  16
   3.  IANA Considerations . . . . . . . . . . . . . . . . . . . . .  17
   4.  Security Considerations . . . . . . . . . . . . . . . . . . .  17
   5.  References  . . . . . . . . . . . . . . . . . . . . . . . . .  17
     5.1.  Normative References  . . . . . . . . . . . . . . . . . .  17
     5.2.  Informative References  . . . . . . . . . . . . . . . . .  18
     5.3.  URIs  . . . . . . . . . . . . . . . . . . . . . . . . . .  18
   Authors' Addresses  . . . . . . . . . . . . . . . . . . . . . . .  19

1.  Introduction

   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.

   Typically, HTTP intermediaries forward requests towards the origin
   server and then forward their responses back to clients.  However, if
   an error occurs before a response is obtained from upstream, the
   response is generated by the intermediary itself.

   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.

   Additionally, intermediaries sometimes want to convey additional
   information about their handling of a response, even if they did not
   generate it.

   To enable these uses, Section 2 defines a new HTTP response field to
   allow intermediaries to convey details of their handling of a
   response, Section 2.1 enumerates the kind of information that can be
   conveyed, and Section 2.3 defines a set of error types for use when a
   proxy generates the response.

Nottingham & Sikora     Expires February 12, 2021               [Page 3]
Internet-Draft                Proxy-Status                   August 2020

1.1.  Notational Conventions

   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 [RFC2119] [RFC8174] when, and only when, they appear in all
   capitals, as shown here.

   This specification uses Structured Headers
   [I-D.ietf-httpbis-header-structure] to specify syntax.  The terms sf-
   list, sf-item, sf-string, sf-token, sf-integer and key refer to the
   structured types defined therein.

   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.

2.  The Proxy-Status HTTP Field

   The Proxy-Status HTTP response field allows an intermediary to convey
   additional information about its handling of a response and its
   associated request.

   It is a List [I-D.ietf-httpbis-header-structure]:

   Proxy-Status   = sf-list

   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.

   For example:

   Proxy-Status: FooProxy, ExampleCDN

   indicates that this response was handled first by FooProxy and then
   ExampleCDN.

   Intermediaries determine when it is appropriate to add the Proxy-
   Status 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.

   The list members identify the intermediary that inserted the value,
   and MUST have a type of either sf-string or sf-token.  Depending on

Nottingham & Sikora     Expires February 12, 2021               [Page 4]
Internet-Draft                Proxy-Status                   August 2020

   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.

   Parameters on each member convey additional information about that
   intermediary's handling of the response; see Section 2.1 for defined
   parameters.  While all of these parameters are OPTIONAL,
   intermediaries are encouraged to provide as much information as
   possible.

   When adding a value to the Proxy-Status field, intermediaries SHOULD
   preserve the existing contents of the field, to allow debugging of
   the entire chain of intermediaries handling the request.

   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).

   Note that there are various security considerations for
   intermediaries using the Proxy-Status field; see Section 4.

   Origin servers MUST NOT generate the Proxy-Status field.

2.1.  Proxy-Status Parameters

   This section lists parameters that can be used on the members of
   Proxy-Status.

2.1.1.  next-hop

   The "next-hop" parameter's value is a sf-string or sf-token that
   identifies the intermediary or origin server selected (and used, if
   contacted) for this response.  Its contents might be a hostname, IP
   address, or alias.

   For example:

   Proxy-Status: cdn.example.org; next-hop=backend.example.org

2.1.2.  next-protocol

   The "next-protocol" parameter's value indicates the ALPN protocol
   identifier [RFC7301] used by the intermediary to connect to the next

Nottingham & Sikora     Expires February 12, 2021               [Page 5]
Internet-Draft                Proxy-Status                   August 2020

   hop.  This is only applicable when that connection was actually
   established.

   The value MUST be either a sf-token or sf-binary.  If the protocol
   identifier is able to be expressed as a sf-token using UTF-8
   encoding, that form MUST be used.

   For example:

   Proxy-Status: "proxy.example.org"; next-protocol=h2

2.1.3.  error

   The "error" parameter's value is a sf-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.

   Section 2.3 lists the Proxy Error Types defined in this document; new
   ones can be defined using the procedure outlined in Section 2.4.

   For example:

   HTTP/1.1 504 Gateway Timeout
   Proxy-Status: SomeCDN; error=connection_timeout

   indicates that this 504 response was generated by SomeCDN, due to a
   connection timeout when going forward.

   Or:

   HTTP/1.1 429 Too Many Requests
   Proxy-Status: SomeReverseProxy; error=http_request_error

   indicates that this 429 Too Many Requests response was generated by
   the intermediary, not the origin.

   When sending the error parameter, the most specific Proxy Error Type
   SHOULD be sent, provided that it accurately represents the error
   condition.  If an appropriate Proxy Error Type is not defined, there
   are a number of generic error types (e.g., proxy_internal_error,
   http_protocol_error) that can be used.  If they are not suitable,
   consider registering a new Proxy Error Type (see Section 2.4).

   Each Proxy Error Type has a Recommended HTTP Status Code.  When
   generating a HTTP response containing "error", 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.

Nottingham & Sikora     Expires February 12, 2021               [Page 6]
Internet-Draft                Proxy-Status                   August 2020

2.1.4.  details

   The "details" parameter's value is a sf-string containing additional
   information not captured anywhere else.  This can include
   implementation-specific or deployment-specific information.

   For example:

  Proxy-Status: ExampleProxy; error="http_protocol_error";
                details="Malformed response header - space before colon"

2.2.  Defining New Proxy-Status Parameters

   New Proxy-Status Parameters can be defined by registering them in the
   HTTP Proxy-Status Parameters registry.

   Registration requests are reviewed and approved by a Designated
   Expert, as per [RFC8126], Section 4.5.  A specification document is
   appreciated, but not required.

   The Expert(s) should consider the following factors when evaluating
   requests:

   o  Community feedback

   o  If the value is sufficiently well-defined

   o  Generic parameters are preferred over vendor-specific,
      application-specific or deployment-specific values.  If a generic
      value cannot be agreed upon in the community, the parameter's name
      should be correspondingly specific (e.g., with a prefix that
      identifies the vendor, application or deployment).

   Registration requests should use the following template:

   o  Name: [a name for the Proxy-Status Parameter that matches key]

   o  Description: [a description of the parameter semantics and value]

   o  Reference: [to a specification defining this parameter]

   See the registry at https://iana.org/assignments/http-proxy-status
   [4] for details on where to send registration requests.

Nottingham & Sikora     Expires February 12, 2021               [Page 7]
Internet-Draft                Proxy-Status                   August 2020

2.3.  Proxy Error Types

   This section lists the Proxy Error Types defined by this document.
   See Section 2.4 for information about defining new Proxy Error Types.

2.3.1.  DNS Timeout

   o  Name: dns_timeout

   o  Description: The intermediary encountered a timeout when trying to
      find an IP address for the next hop hostname.

   o  Extra Parameters: None.

   o  Recommended HTTP status code: 504

2.3.2.  DNS Error

   o  Name: dns_error

   o  Description: The intermediary encountered a DNS error when trying
      to find an IP address for the next hop hostname.

   o  Extra Parameters:

      *  rcode: A sf-string conveying the DNS RCODE that indicates the
         error type.  See [RFC8499], Section 3.

   o  Recommended HTTP status code: 502

2.3.3.  Destination Not Found

   o  Name: destination_not_found

   o  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.

   o  Extra Parameters: None.

   o  Recommended HTTP status code: 500

Nottingham & Sikora     Expires February 12, 2021               [Page 8]
Internet-Draft                Proxy-Status                   August 2020

2.3.4.  Destination Unavailable

   o  Name: destination_unavailable

   o  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.

   o  Extra Parameters: None.

   o  Recommended HTTP status code: 503

2.3.5.  Destination IP Prohibited

   o  Name: destination_ip_prohibited

   o  Description: The intermediary is configured to prohibit
      connections to the next hop IP address.

   o  Extra Parameters: None.

   o  Recommended HTTP status code: 502

2.3.6.  Destination IP Unroutable

   o  Name: destination_ip_unroutable

   o  Description: The intermediary cannot find a route to the next hop
      IP address.

   o  Extra Parameters: None.

   o  Recommended HTTP status code: 502

2.3.7.  Connection Refused

   o  Name: connection_refused

   o  Description: The intermediary's connection to the next hop was
      refused.

   o  Extra Parameters: None.

   o  Recommended HTTP status code: 502

Nottingham & Sikora     Expires February 12, 2021               [Page 9]
Internet-Draft                Proxy-Status                   August 2020

2.3.8.  Connection Terminated

   o  Name: connection_terminated

   o  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.

   o  Extra Parameters: None.

   o  Recommended HTTP status code: 502

2.3.9.  Connection Timeout

   o  Name: connection_timeout

   o  Description: The intermediary's attempt to open a connection to
      the next hop timed out.

   o  Extra Parameters: None.

   o  Recommended HTTP status code: 504

2.3.10.  Connection Read Timeout

   o  Name: connection_read_timeout

   o  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.

   o  Extra Parameters: None.

   o  Recommended HTTP status code: 504

2.3.11.  Connection Write Timeout

   o  Name: connection_write_timeout

   o  Description: The intermediary was attempting to write data to a
      connection, but was not able to (e.g., because its buffers were
      full).

   o  Extra Parameters: None.

   o  Recommended HTTP status code: 504

Nottingham & Sikora     Expires February 12, 2021              [Page 10]
Internet-Draft                Proxy-Status                   August 2020

2.3.12.  Connection Limit Reached

   o  Name: connnection_limit_reached

   o  Description: The intermediary is configured to limit the number of
      connections it has to the next hop, and that limit has been
      passed.

   o  Extra Parameters: None.

   o  Recommended HTTP status code: 503

2.3.13.  TLS Protocol Error

   o  Name: tls_protocol_error

   o  Description: The intermediary encountered a TLS error when
      communicating with the next hop, either during handshake or
      afterwards.

   o  Extra Parameters: None.

   o  Recommended HTTP status code: 502

   Note that additional information about the error can be recorded in
   the details parameter (as is the case for all errors).

2.3.14.  TLS Certificate Error

   o  Name: tls_certificate_error

   o  Description: The intermediary encountered an error when verifying
      the certificate presented by the next hop.

   o  Extra Parameters: None.

   o  Recommended HTTP status code: 502

   Note that additional information about the error can be recorded in
   the details parameter (as is the case for all errors).

2.3.15.  TLS Alert Received

   o  Name: tls_alert_received

   o  Description: The intermediary received a TLS alert from the next
      hop.

Nottingham & Sikora     Expires February 12, 2021              [Page 11]
Internet-Draft                Proxy-Status                   August 2020

   o  Extra Parameters:

      *  alert_message: a sf-token containing the applicable description
         string from the TLS Alerts registry.

   o  Recommended HTTP status code: 502

2.3.16.  HTTP Request Error

   o  Name: http_request_error

   o  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.

   o  Extra Parameters:

      *  status_code: a sf-integer containing the generated status code.

      *  status_phrase: a sf-string containing the generated status
         phrase.

   o  Recommended HTTP status code: The applicable 4xx status code

   This type helps distinguish between responses generated by
   intermediaries from those generated by the origin.

2.3.17.  HTTP Request Denied

   o  Name: http_request_denied

   o  Description: The intermediary rejected the HTTP request based on
      its configuration and/or policy settings.  The request wasn't
      forwarded to the next hop.

   o  Extra Parameters: None.

   o  Recommended HTTP status code: 403

2.3.18.  HTTP Incomplete Response

   o  Name: http_response_incomplete

   o  Description: The intermediary received an incomplete response to
      the request from the next hop.

   o  Extra Parameters: None.

Nottingham & Sikora     Expires February 12, 2021              [Page 12]
Internet-Draft                Proxy-Status                   August 2020

   o  Recommended HTTP status code: 502

2.3.19.  HTTP Response Header Block Too Large

   o  Name: http_response_header_block_size

   o  Description: The intermediary received a response to the request
      whose header block was considered too large.

   o  Extra Parameters:

      *  header_block_size: a sf-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.

   o  Recommended HTTP status code: 502

2.3.20.  HTTP Response Header Too Large

   o  Name: http_response_header_size

   o  Description: The intermediary received a response to the request
      containing an individual header line that was considered too
      large.

   o  Extra Parameters:

      *  header_name: a sf-string indicating the name of the header that
         triggered the error.

   o  Recommended HTTP status code: 502

2.3.21.  HTTP Response Body Too Large

   o  Name: http_response_body_size

   o  Description: The intermediary received a response to the request
      whose body was considered too large.

   o  Extra Parameters:

      *  body_size: a sf-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.

   o  Recommended HTTP status code: 502

Nottingham & Sikora     Expires February 12, 2021              [Page 13]
Internet-Draft                Proxy-Status                   August 2020

2.3.22.  HTTP Response Transfer-Coding Error

   o  Name: http_response_transfer_coding

   o  Description: The intermediary encountered an error decoding the
      transfer-coding of the response.

   o  Extra Parameters:

      *  coding: a sf-token containing the specific coding that caused
         the error.

   o  Recommended HTTP status code: 502

2.3.23.  HTTP Response Content-Coding Error

   o  Name: http_response_content_coding

   o  Description: The intermediary encountered an error decoding the
      content-coding of the response.

   o  Extra Parameters:

      *  coding: a sf-token containing the specific coding that caused
         the error.

   o  Recommended HTTP status code: 502

2.3.24.  HTTP Response Timeout

   o  Name: http_response_timeout

   o  Description: The intermediary reached a configured time limit
      waiting for the complete response.

   o  Extra Parameters: None.

   o  Recommended HTTP status code: 504

2.3.25.  HTTP Upgrade Failed

   o  Name: http_upgrade_failed

   o  Description: The HTTP Upgrade between the intermediary and the
      next hop failed.

   o  Extra Parameters: None.

Nottingham & Sikora     Expires February 12, 2021              [Page 14]
Internet-Draft                Proxy-Status                   August 2020

   o  Recommended HTTP status code: 502

2.3.26.  HTTP Protocol Error

   o  Name: http_protocol_error

   o  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.

   o  Extra Parameters: None.

   o  Recommended HTTP status code: 502

   Note that additional information about the error can be recorded in
   the details parameter (as is the case for all errors).

2.3.27.  Proxy Internal Response

   o  Name: proxy_internal_response

   o  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).

   o  Extra Parameters: None.

   o  Recommended HTTP status code:

2.3.28.  Proxy Internal Error

   o  Name: proxy_internal_error

   o  Description: The intermediary encountered an internal error
      unrelated to the origin.

   o  Extra Parameters: None

   o  Recommended HTTP status code: 500

   Note that additional information about the error can be recorded in
   the details parameter (as is the case for all errors).

2.3.29.  Proxy Configuration Error

   o  Name: proxy_configuration_error

Nottingham & Sikora     Expires February 12, 2021              [Page 15]
Internet-Draft                Proxy-Status                   August 2020

   o  Description: The intermediary encountered an error regarding its
      configuration.

   o  Extra Parameters: None

   o  Recommended HTTP status code: 500

   Note that additional information about the error can be recorded in
   the details parameter (as is the case for all errors).

2.3.30.  Proxy Loop Detected

   o  Name: proxy_loop_detected

   o  Description: The intermediary tried to forward the request to
      itself, or a loop has been detected using different means (e.g.
      [RFC8586]).

   o  Extra Parameters: None.

   o  Recommended HTTP status code: 502

2.4.  Defining New Proxy Error Types

   New Proxy Error Types can be defined by registering them in the HTTP
   Proxy Error Types registry.

   Registration requests are reviewed and approved by a Designated
   Expert, as per [RFC8126], Section 4.5.  A specification document is
   appreciated, but not required.

   The Expert(s) should consider the following factors when evaluating
   requests:

   o  Community feedback

   o  If the value is sufficiently well-defined

   o  Generic types are preferred over vendor-specific, application-
      specific or deployment-specific values.  If a generic value cannot
      be agreed upon in the community, the types's name should be
      correspondingly specific (e.g., with a prefix that identifies the
      vendor, application or deployment).

   Registration requests should use the following template:

   o  Name: [a name for the Proxy Error Type that matches sf-token]

Nottingham & Sikora     Expires February 12, 2021              [Page 16]
Internet-Draft                Proxy-Status                   August 2020

   o  Description: [a description of the conditions that generate the
      Proxy Error Type]

   o  Extra Parameters: [zero or more optional parameters, along with
      their allowable type(s)]

   o  Recommended HTTP status code: [the appropriate HTTP status code
      for this entry]

   See the registry at https://iana.org/assignments/http-proxy-status
   [5] for details on where to send registration requests.

3.  IANA Considerations

   Upon publication, please create the HTTP Proxy-Status Parameters
   registry and the HTTP Proxy Error Types registry at
   https://iana.org/assignments/http-proxy-statuses [6] and populate
   them with the types defined in Section 2.1 and Section 2.3
   respectively; see Section 2.2 and Section 2.4 for its associated
   procedures.

4.  Security Considerations

   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.

   As a result, care needs to be taken when deciding to generate a
   Proxy-Status field.  Note that intermediaries are not required to
   generate a Proxy-Status field in any response, and can conditionally
   generate them based upon request attributes (e.g., authentication
   tokens, IP address).

   Likewise, generation of all parameters is optional.

5.  References

5.1.  Normative References

   [I-D.ietf-httpbis-header-structure]
              Nottingham, M. and P. Kamp, "Structured Field Values for
              HTTP", draft-ietf-httpbis-header-structure-19 (work in
              progress), June 2020.

Nottingham & Sikora     Expires February 12, 2021              [Page 17]
Internet-Draft                Proxy-Status                   August 2020

   [RFC2119]  Bradner, S., "Key words for use in RFCs to Indicate
              Requirement Levels", BCP 14, RFC 2119,
              DOI 10.17487/RFC2119, March 1997,
              <https://www.rfc-editor.org/info/rfc2119>.

   [RFC7301]  Friedl, S., Popov, A., Langley, A., and E. Stephan,
              "Transport Layer Security (TLS) Application-Layer Protocol
              Negotiation Extension", RFC 7301, DOI 10.17487/RFC7301,
              July 2014, <https://www.rfc-editor.org/info/rfc7301>.

   [RFC8126]  Cotton, M., Leiba, B., and T. Narten, "Guidelines for
              Writing an IANA Considerations Section in RFCs", BCP 26,
              RFC 8126, DOI 10.17487/RFC8126, June 2017,
              <https://www.rfc-editor.org/info/rfc8126>.

   [RFC8174]  Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC
              2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174,
              May 2017, <https://www.rfc-editor.org/info/rfc8174>.

   [RFC8499]  Hoffman, P., Sullivan, A., and K. Fujiwara, "DNS
              Terminology", BCP 219, RFC 8499, DOI 10.17487/RFC8499,
              January 2019, <https://www.rfc-editor.org/info/rfc8499>.

5.2.  Informative References

   [RFC8586]  Ludin, S., Nottingham, M., and N. Sullivan, "Loop
              Detection in Content Delivery Networks (CDNs)", RFC 8586,
              DOI 10.17487/RFC8586, April 2019,
              <https://www.rfc-editor.org/info/rfc8586>.

5.3.  URIs

   [1] https://lists.w3.org/Archives/Public/ietf-http-wg/

   [2] https://httpwg.org/

   [3] https://github.com/httpwg/http-extensions/labels/proxy-status

   [4] https://iana.org/assignments/http-proxy-status

   [5] https://iana.org/assignments/http-proxy-status

   [6] https://iana.org/assignments/http-proxy-statuses

Nottingham & Sikora     Expires February 12, 2021              [Page 18]
Internet-Draft                Proxy-Status                   August 2020

Authors' Addresses

   Mark Nottingham
   Fastly
   made in
   Prahran, VIC
   Australia

   Email: mnot@mnot.net
   URI:   https://www.mnot.net/

   Piotr Sikora
   Google

   Email: piotrsikora@google.com

Nottingham & Sikora     Expires February 12, 2021              [Page 19]