log when setting object properties to non-ascii values
Bug #1503898 reported by
Lin Hua Cheng
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python-openstackclient |
Fix Released
|
Medium
|
Steve Martinelli |
Bug Description
Using non-ascii characters on the property is failing
Output:
(openstack) container set --property test=您好1 您好1
'ascii' codec can't decode byte 0xe6 in position 27: ordinal not in range(128)
property are passed as HTTP header to swift API.
HTTP header however doesn't support non-ascii characters:
http://
http://
Add a validation to check the property values before sending to keystone
summary: |
- Setting swift object properties with non-ascii fails + log when setting object properties to non-ascii values |
Changed in python-openstackclient: | |
milestone: | none → 1.9.0 |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
i whipped up a patch:
stevemar@ ubuntu: /opt/stack/ python- openstackclient $ openstack container set mycon2 --property "k=é" --property p=q ubuntu: /opt/stack/ python- openstackclient $ openstack container show mycon2 ------- -+----- ------- ------- ------- ------- ------+ ------- -+----- ------- ------- ------- ------- ------+ 1b491cbe42abcf8 51a8e85 | ------- -+----- ------- ------- ------- ------- ------+
Cannot set properties to non-ascii values, skipping
stevemar@
+------
| Field | Value |
+------
| account | AUTH_658ce39281
| bytes_used | 0 |
| container | mycon2 |
| object_count | 0 |
| properties | p='q' |
+------