Dechunk result if necessary

Fixes #2710. Implementation is based on OP @marcuslinke 's workaround.
This too is unnecessary, since the method that calls this doesn't even use the returned response header.