Fix exception thrown when server omit Content-lenght header