

def _send_request(self, method, url, body, headers):
    header_names = dict.fromkeys([k.lower() for k in headers])
    skips = {
        
    }
    if ('host' in header_names):
        skips['skip_host'] = 1
    if ('accept-encoding' in header_names):
        skips['skip_accept_encoding'] = 1
    self.putrequest(method, url, **skips)
    if ((body is not None) and ('content-length' not in header_names)):
        self._set_content_length(body)
    for (hdr, value) in headers.items():
        self.putheader(hdr, value)
    if isinstance(body, str):
        body = body.encode('iso-8859-1')
    self.endheaders(body)

dataset/ETHPy150Open OpenCobolIDE/OpenCobolIDE/open_cobol_ide/extlibs/future/backports/http/client.py HTTPConnection._send_request/original