Fix http accept header checking methods
Merge pull request #9 from 5t111111/master

Handle rack's `request.accept` correctly to detect json and xml requests.