'Turn any headers into environ variables'

def _set_headers(self, headers, environ):

    if (not headers):
        return
    for (header, value) in headers.items():
        if (header.lower() == 'content-type'):
            var = 'CONTENT_TYPE'
        elif (header.lower() == 'content-length'):
            var = 'CONTENT_LENGTH'
        else:
            var = ('HTTP_%s' % header.replace('-', '_').upper())
        environ[var] = value
