Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Percent encoded URLs not handled correctly #30

Open
cronosun opened this issue Oct 6, 2016 · 0 comments
Open

Percent encoded URLs not handled correctly #30

cronosun opened this issue Oct 6, 2016 · 0 comments

Comments

@cronosun
Copy link

cronosun commented Oct 6, 2016

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant