Fixed logic error.
Properly handling Symfony response, closes #918.
Merge pull request #979 from cmfcmf/response-fix

Removed the weird cache-control strings and fixed a logical error where each unknown function was redirected to the Hooks page.