[Twisted-Python] stupid case sensitive web clients

Carlos Eberhardt carlos at eberhardt.net
Tue Nov 12 14:16:48 MST 2002


Bob Ippolito wrote:

> But what my stupid device wants to see is:
> l.append("%s: %s\r\n" % ('-'.join(map(lambda 
> n:n.capitalize(),name.split('-'))), value)) # content-length turns 
> into Content-Length
>
Unrelated yet related, string.capwords() would perhaps be cleaner.

string.capwords(value, '-')

lurkingly,
carlos





More information about the Twisted-Python mailing list