sensu / sensu-dashboard

A dashboard for Sensu, for displaying & managing events & clients.
http://sensuapp.org
MIT License
96 stars 44 forks source link

Event model IDs cause URL-encoded slash in requests, resulting in 404 errors #146

Open pdf opened 11 years ago

pdf commented 11 years ago

I looked at trying to fix this, but I'm struggling because I don't know backbone.js.

At models/event.coffee#L15 the id is set to a value with a / in it. Unfortunately, when the request is generated, this / is URL-encoded to %2F, so you end up with requests like:

DELETE https://apiurl/events/client_name%2Fcheck_name

And that of course, results in a 404, because client_name%2Fcheck_name is definitely not a valid client name.

amdprophet commented 11 years ago

I believe we had found a way around this in some of the other models (likely overriding the sync method, or specifying the update URL). I'll revisit it when I get a chance; I must have missed adding the fix to the event model.

amdprophet commented 11 years ago

Whoops! I didn't mean to close that.