escape and encode HTTP headers
escape and encode HTTP headers

The v1 glanceclient takes various user input for image metadata and
encodes it as HTTP headers.  Some level of armoring against
malice/incompetence should be done here.  e.g., the
"x-image-meta-property-description" header is a free-form text
field, and can have newlines, but passing in newlines breaks
everything, and leaves the API prone to injection attacks.

Fixes Jira: OPENSTACK-593

Change-Id: Ib3520380e5f876537be9bba6706f2517dffd99c9

metacloud/python-glanceclient,metacloud/python-glanceclient