'Translate CGI-environ header names to HTTP header names.'

def translate_headers(self, environ):

    for cgiName in environ:
        if (cgiName in self.headerNames):
            (yield (self.headerNames[cgiName], environ[cgiName]))
        elif (cgiName[:5] == 'HTTP_'):
            translatedHeader = cgiName[5:].replace('_', '-')
            (yield (translatedHeader, environ[cgiName]))
