Uploaded image for project: 'Red Hat 3scale API Management'
  1. Red Hat 3scale API Management
  2. THREESCALE-9436

Please flip the status codes in the first exaple in HTTP Status Code Overwrite policy example

    XMLWordPrintable

Details

    • False
    • None
    • False
    • Not Started
    • Not Started
    • Not Started
    • Not Started
    • Not Started
    • Not Started
    • 2

    Description

      4.1.14. HTTP Status Code Overwrite
      The section explains that

      For example, you could use the HTTP Status Code Overwrite policy to change upstream 201, "Created", response codes, to 200, "OK", response codes.

      Another example of a response code that you might want to change is the response when a content limit is exceeded. The upstream might return 413, payload too large, when a response code of 414, request-URI too long, would be more helpful.

      and the example json is:

      {
        "name": "statuscode_overwrite",
        "version": "builtin",
        "configuration": {
          "http_statuses": [
            {
              "upstream": 200,
              "apicast": 201
            },
            {
              "upstream": 413,
              "apicast": 414
            }
          ]
        }
      }
      

      The first example is confusing because the status code in the json is reversed from the above explanation.
      So please flip the status codes like this:

      {
        "name": "statuscode_overwrite",
        "version": "builtin",
        "configuration": {
          "http_statuses": [
            {
              "upstream": 201,
              "apicast": 200
            },
            {
              "upstream": 413,
              "apicast": 414
            }
          ]
        }
      }
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            rhn-support-tkonishi Takayuki Konishi
            Darren Fennessy Darren Fennessy
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: