Log HTTP response headers in debug logs

We've had requests to log the HTTP response headers
in the debug log, as it helps with troubleshooting.
Merge branch 'log-headers' into develop

* log-headers:
  Log HTTP response headers in debug logs