Use headers from getHeaders to include all headers.and Content-Lenght

Fixed #273