def get_header_name(name):
 uc_name = re.sub('\\W+', '_', force_text(name)).upper()
 if ((uc_name in ['CONTENT_LENGTH', 'CONTENT_TYPE']) or uc_name.startswith('HTTP_')):
  return uc_name
 return 'HTTP_{0}'.format(uc_name)

def get_header_name ( name ) : uc_name = re . sub ( '\\W+' , '_' , force_text ( name ) ) . upper ( ) if ( ( uc_name in [ 'CONTENT_LENGTH' , 'CONTENT_TYPE' ] ) or uc_name . startswith ( 'HTTP_' ) ) : return uc_name return 'HTTP_{0}' . format ( uc_name )
returns "http_header_name" for "header-name" or "header-name" .