obfuscurity / descartes

Introspective dashboard for Graphite
MIT License
502 stars 65 forks source link

Better api request detection #159

Closed bitprophet closed 9 years ago

bitprophet commented 10 years ago

See commit log for details. tl;dr for a "did the client explicitly request application/json" check, we can't use the newer request.accept?() method, but the code here matches the intent of the old check. Also refactors it.

kowsik commented 10 years ago

Any chance of getting this change in? Just deployed to Heroku and noticed that request.accept.include?("application/json") returns false. Tried bumping sinatra to 1.4.5 and still the same issue.

obfuscurity commented 10 years ago

@bitprophet I'd like to get your version in and give you credit but it needs rebasing. I'd rather do the work myself so as not to dump this :poop: on you, but then you wouldn't get the full attribution.

bitprophet commented 9 years ago

I'll see if I can rebase it soon :)

bitprophet commented 9 years ago

@obfuscurity Rebased! Can't easily test it out at the moment but I see Travis is running so I'll just wait for that :3

EDIT:

obfuscurity commented 9 years ago

:heart: