Change method for headers creation
Add Content-Length to message headers
Write headers and message in one-line