#NEWLINE# def header_name( name ) : #NEWLINE# #INDENT# 'Convert header name like HTTP_XXXX_XXX to Xxxx-Xxx:' #NEWLINE# words = name [ 5 : ] . split ( '_' ) #NEWLINE# for i in range ( len ( words ) ) : #NEWLINE# #INDENT# words [ i ] = ( words [ i ] [ 0 ] . upper ( ) + words [ i ] [ 1 : ] . lower ( ) ) #NEWLINE# #UNINDENT# result = '-' . join ( words ) #NEWLINE# return result