Only write the body for non HEAD requests.

If the original request uses the HEAD http method, the response body has to be empty (cf. this answer on stackoverflow: http://stackoverflow.com/a/9141355).