Communicating Warning Information in HTTP APIs
draft-cedik-http-warning-02

Document Type Active Internet-Draft (individual)
Last updated 2020-09-23
Stream (None)
Intended RFC status (None)
Formats plain text xml pdf htmlized (tools) htmlized bibtex
Stream Stream state (No stream defined)
Consensus Boilerplate Unknown
RFC Editor Note (None)
IESG IESG state I-D Exists
Telechat date
Responsible AD (None)
Send notices to (None)
Network Working Group                                           A. Cedik
Internet-Draft                                            shipcloud GmbH
Intended status: Standards Track                                E. Wilde
Expires: March 28, 2021                                            Axway
                                                      September 24, 2020

             Communicating Warning Information in HTTP APIs
                      draft-cedik-http-warning-02

Abstract

   This document defines a new HTTP field Content-Warning and a standard
   response format for representing warning information in HTTP APIs.

Note to Readers

   This draft should be discussed on the rfc-interest mailing list
   (<https://lists.w3.org/Archives/Public/ietf-http-wg/>).

   Online access to all versions and files is available on GitHub
   (<https://github.com/dret/I-D/tree/master/http-warning>).

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 March 28, 2021.

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

Cedik & Wilde            Expires March 28, 2021                 [Page 1]
Internet-DraftCommunicating Warning Information in HTTP APSeptember 2020

   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  . . . . . . . . . . . . . . . . . . . . . . . .   2
   2.  Notational Conventions  . . . . . . . . . . . . . . . . . . .   3
   3.  Content-Warning Field . . . . . . . . . . . . . . . . . . . .   3
     3.1.  HTTP request methods  . . . . . . . . . . . . . . . . . .   4
   4.  The "embedded-warning" Content-Warning Type . . . . . . . . .   4
     4.1.  Allowed HTTP request methods for embedded-warning . . . .   4
   5.  JSON Warning Format . . . . . . . . . . . . . . . . . . . . .   5
   6.  Example with HTTP Field and Embedded Warning  . . . . . . . .   5
   7.  Cache Considerations  . . . . . . . . . . . . . . . . . . . .   6
     7.1.  Caching the "embedded-warning" Content-Warning type . . .   7
   8.  Security Considerations . . . . . . . . . . . . . . . . . . .   7
     8.1.  Absence of a response body  . . . . . . . . . . . . . . .   7
     8.2.  Absence of warnings in the response body  . . . . . . . .   8
   9.  IANA Considerations . . . . . . . . . . . . . . . . . . . . .   8
     9.1.  HTTP Field Content-Warning  . . . . . . . . . . . . . . .   8
     9.2.  Content-Warning Type Registry . . . . . . . . . . . . . .   8
       9.2.1.  Registration Procedure  . . . . . . . . . . . . . . .   8
       9.2.2.  Initial Registry Content  . . . . . . . . . . . . . .   9
   10. References  . . . . . . . . . . . . . . . . . . . . . . . . .   9
     10.1.  Normative References . . . . . . . . . . . . . . . . . .   9
     10.2.  Informative References . . . . . . . . . . . . . . . . .  10
   Appendix A.  Acknowledgements . . . . . . . . . . . . . . . . . .  10
   Authors' Addresses  . . . . . . . . . . . . . . . . . . . . . . .  10

1.  Introduction

   Many current APIs are based on HTTP [RFC7230] as their application
   protocol.  Their response handling model is based on the assumption
   that requests either are successful or they fail.  In both cases
   (success and failure) an HTTP status code [RFC7231] is returned to
   convey either fact.

   But response status is not always strictly either success or failure.
   For example, there are cases where an underlying system returns a
   response with data that cannot be defined as a clear error.  API
   providers who are integrating such a service might want to return a
   success response nonetheless, but returning a HTTP status code of
   e.g. 200 OK without any additional information is not the only
   possible approach in this case.

Cedik & Wilde            Expires March 28, 2021                 [Page 2]
Show full document text