parameters: (self, environ)
docstring: Translate CGI-environ header names to HTTP header names.
docstring_summary: Translate CGI-environ header names to HTTP header names.
docstring_tokens: Translate CGI - environ header names to HTTP header names .
function: def translate_headers(self, environ):
          """Translate CGI-environ header names to HTTP header names."""
          for cgiName in environ:
              # We assume all incoming header keys are uppercase already.
              if cgiName in self.headerNames:
                  yield self.headerNames[cgiName], environ[cgiName]
              elif cgiName[:5] == 'HTTP_':
                  # Hackish attempt at recovering original header names.
                  translatedHeader = cgiName[5:].replace('_', '-')
                  yield translatedHeader, environ[cgiName]
function_tokens: def translate_headers ( self , environ ) : for cgiName in environ : # We assume all incoming header keys are uppercase already. if cgiName in self . headerNames : yield self . headerNames [ cgiName ] , environ [ cgiName ] elif cgiName [ : 5 ] == 'HTTP_' : # Hackish attempt at recovering original header names. translatedHeader = cgiName [ 5 : ] . replace ( '_' , '-' ) yield translatedHeader , environ [ cgiName ]