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

APIaaP is causing URL encoding on API requests' paths

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Major
    • None
    • SaaS, 2.10 GA
    • Gateway
    • False
    • False
    • Not Started
    • Not Started
    • Not Started
    • Not Started
    • Not Started
    • Not Started
    • Undefined
    • Hide
      1. Create a Product.
      2. Add echo-api as a backend. Set the public path to /foo.
      3. Promote the config to the staging environment.
      4. Send request to https://<staging url>/foo/+1234
        Actual result:
        + should be encoded to %2B, but it changed to %20.
      Show
      Create a Product. Add echo-api as a backend. Set the public path to /foo . Promote the config to the staging environment. Send request to https://<staging url>/foo/+1234 Actual result: + should be encoded to %2B , but it changed to %20 .

    Description

      + character should be encoded to %2B, but it changed to %20.

      Routing Policy set as follows:

                  {
                      "name": "routing",
                      "version": "builtin",
                      "enabled": true,
                      "configuration": {
                          "rules": [
                              {
                                  "url": "https://echo-api.3scale.net:443",
                                  "owner_id": 2,
                                  "owner_type": "BackendApi",
                                  "condition": {
                                      "operations": [
                                          {
                                              "match": "path",
                                              "op": "matches",
                                              "value": "^(/foo/.*|/foo/?)"
                                          }
                                      ]
                                  },
                                  "replace_path": "{{uri | remove_first: '/foo'}}"
                              }
                          ]
                      }
                  },
      

      Example request and response:

      curl "https://api-3scale-apicast-staging.apps.example.com:443/foo/+1234?user_key=b54627820843566c0ebdb86d2d7a20b7"  -k  
      {
        "method": "GET",
        "path": "/%201234",
        "args": "user_key=b54627820843566c0ebdb86d2d7a20b7",
        "body": "",
        "headers": {
          "HTTP_VERSION": "HTTP/1.1",
          "HTTP_HOST": "echo-api.3scale.net",
          "HTTP_ACCEPT": "*/*",
          "HTTP_USER_AGENT": "curl/7.69.1",
          "HTTP_X_3SCALE_PROXY_SECRET_TOKEN": "Shared_secret_sent_from_proxy_to_API_backend_48c93e70ada1b37a",
          "HTTP_X_REAL_IP": "10.129.2.1",
          "HTTP_X_FORWARDED_FOR": "192.168.1.5, 203.0.113.192, 10.0.101.226",
          "HTTP_X_FORWARDED_HOST": "echo-api.3scale.net",
          "HTTP_X_FORWARDED_PORT": "443",
          "HTTP_X_FORWARDED_PROTO": "https",
          "HTTP_FORWARDED": "for=10.0.101.226;host=echo-api.3scale.net;proto=https"
        },
        "uuid": "1efc9803-adb6-4ccd-8999-4f1a954862bf"
      }
      

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: