Fix accessing of headers directly
Merge pull request #3398 branch 'hotfix/request-toString'