Moved this because ``client.sock`` is set only after the request is completed (after endheaders)