Skip to content

Percent encoded URLs not handled correctly #30

Description

@cronosun

Note: Similar to the fixed bug #29

Intro

  • PUTing to an URL with percent encoding and then GETing that resource works (no problem here).
  • But when the collection is listed (or expanded), the percent encoding is not respected (internal info: PUTing to hello%20world creates a redis key called 'hello%world' instead of 'hello world').
  • Why should it be respected? Percent-encoding is a HTTP feature and protocol details should not intrude into the rest storage (to communication with rest storage we use the vertx event bus).

Reproduction (preparation)

Note: I use putty to make sure nobody touches the HTTP url (does no further encoding).

Put this:

PUT /nemo/tests/mytest25/hello%20world HTTP/1.1
Host: nemotest.pnet.ch:7012
Content-Type: application/json
Cache-Control: no-cache

{"hello" : "woelsd" }

put_request_2

And put this:

PUT /nemo/tests/mytest25/sub/hello%20world HTTP/1.1
Host: nemotest.pnet.ch:7012
Content-Type: application/json
Cache-Control: no-cache

{"hello" : "woelsd" }

put_request

Result

GET expand=1

Perform a GET on http://nemotest.pnet.ch:7012/nemo/tests/mytest25?expand=1

Actual:

{
  "mytest25": {
    "sub": [
      "hello%20world"
    ],
    "hello%20world": {
      "hello": "woelsd"
    }
  }
}

Expected

{
  "mytest25": {
    "sub": [
      "hello world"
    ],
    "hello world": {
      "hello": "woelsd"
    }
  }
}

Collect

Perform a GET on http://nemotest.pnet.ch:7012/nemo/tests/mytest25

Actual:

{
  "mytest25": [
    "sub/",
    "hello%20world"
  ]
}

Expected:

{
  "mytest25": [
    "sub/",
    "hello world"
  ]
}

Web GUI

ui-demo

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions