def get_headers_from_environ(environ):
headers = wsgiref.headers.Headers([])<EOL>for header, value in environ.iteritems():<EOL><INDENT>if header.startswith('<STR_LIT>'):<EOL><INDENT>headers[header[<NUM_LIT:5>:].replace('<STR_LIT:_>', '<STR_LIT:->')] = value<EOL><DEDENT><DEDENT>if '<STR_LIT>' in environ:<EOL><INDENT>headers['<STR_LIT>'] = environ['<STR_LIT>']<EOL><DEDENT>return headers<EOL>
Get a wsgiref.headers.Headers object with headers from the environment.

    Headers in environ are prefixed with 'HTTP_', are all uppercase, and have
    had dashes replaced with underscores.  This strips the HTTP_ prefix and
    changes underscores back to dashes before adding them to the returned set
    of headers.

    Args:
      environ: An environ dict for the request as defined in PEP-333.

    Returns:
      A wsgiref.headers.Headers object that's been filled in with any HTTP
      headers found in environ.