Changed line separator to double newline according to it is end of HTTP header sign. *It prevents our socket from stalling* and line by line read is not neccesary
Added missing header split