def dump_header(iterable, allow_token=True):
 if isinstance(iterable, dict):
  items = []
  for (key, value) in iterable.iteritems():
   if (value is None):
    items.append(key)
   else:
    items.append(('%s=%s' % (key, quote_header_value(value, allow_token=allow_token))))
 else:
  items = [quote_header_value(x, allow_token=allow_token) for x in iterable]
 return ', '.join(items)

def dump_header ( iterable , allow_token = True ) : if isinstance ( iterable , dict ) : items = [ ] for ( key , value ) in iterable . iteritems ( ) : if ( value is None ) : items . append ( key ) else : items . append ( ( '%s=%s' % ( key , quote_header_value ( value , allow_token = allow_token ) ) ) ) else : items = [ quote_header_value ( x , allow_token = allow_token ) for x in iterable ] return ', ' . join ( items )
dump an http header again .