handle http accept headers more gracefully
fix indention
also handle lowercase headers
Merge pull request #8980 from owncloud/better-accept-header

handle http accept headers more gracefully