mashery/iodocs

iodocs hangs on starting a request with a path parameter containing spaces

Opened this issue · 0 comments

having an api method to request a user version at a specifc timestamp
/api/v1/users/:userId/version-at/:timestamp

this call fails, when a user types any value in the timestamp parameter field containing a space. the entire chrome tab crashes.

this is not related to timestamp itself, as any other field that is passed into the URL has the same behavior.

at least fields of the type: "path" should get a default urlEncode() over them.
this will transform spaces in %20 among other characters ...

you could argue that the user should know that, but it's kind of a shame that the entire tab just hangs or crashes.

server console window reports the following:

in processRequest
json:  { oid: '5441c14cf1a0caa315a0ca2d',
  timestamp: '2014-11-14 00:00' }
locations:  { oid: 'path', timestamp: 'path' }
Unsecured Call
Protocol: HTTP
error: socket hang up