Revision e7b51248 pithos/api/functions.py
b/pithos/api/functions.py | ||
---|---|---|
39 | 39 |
from django.template.loader import render_to_string |
40 | 40 |
from django.utils import simplejson as json |
41 | 41 |
from django.utils.http import parse_etags |
42 |
from django.utils.encoding import smart_unicode, smart_str |
|
42 | 43 |
from xml.dom import minidom |
43 | 44 |
|
44 | 45 |
from pithos.api.faults import (Fault, NotModified, BadRequest, Unauthorized, ItemNotFound, Conflict, |
... | ... | |
439 | 440 |
keys = request.GET.get('meta') |
440 | 441 |
if keys: |
441 | 442 |
keys = keys.split(',') |
442 |
keys = [format_header_key('X-Object-Meta-' + x.strip()) for x in keys if x.strip() != ''] |
|
443 |
l = [smart_str(x) for x in keys if x.strip() != ''] |
|
444 |
keys = [format_header_key('X-Object-Meta-' + x.strip()) for x in l] |
|
443 | 445 |
else: |
444 | 446 |
keys = [] |
445 | 447 |
|
... | ... | |
677 | 679 |
meta = {} |
678 | 680 |
validate_matching_preconditions(request, meta) |
679 | 681 |
|
680 |
copy_from = request.META.get('HTTP_X_COPY_FROM')
|
|
681 |
move_from = request.META.get('HTTP_X_MOVE_FROM')
|
|
682 |
copy_from = smart_unicode(request.META.get('HTTP_X_COPY_FROM'), strings_only=True)
|
|
683 |
move_from = smart_unicode(request.META.get('HTTP_X_MOVE_FROM'), strings_only=True)
|
|
682 | 684 |
if copy_from or move_from: |
683 | 685 |
content_length = get_content_length(request) # Required by the API. |
684 | 686 |
|
Also available in: Unified diff