Revision a3fcee5b snf-pithos-app/pithos/api/util.py

b/snf-pithos-app/pithos/api/util.py
42 42
from django.utils.encoding import smart_unicode, smart_str
43 43
from django.core.files.uploadhandler import FileUploadHandler
44 44
from django.core.files.uploadedfile import UploadedFile
45
from django.core.urlresolvers import reverse
45 46

  
46 47
from snf_django.lib.api.parsedate import parse_http_date_safe, parse_http_date
47 48
from snf_django.lib import api
......
61 62
                                 RADOS_STORAGE, RADOS_POOL_BLOCKS,
62 63
                                 RADOS_POOL_MAPS, TRANSLATE_UUIDS,
63 64
                                 PUBLIC_URL_SECURITY,
64
                                 PUBLIC_URL_ALPHABET)
65
                                 PUBLIC_URL_ALPHABET,
66
                                 COOKIE_NAME, BASE_URL)
65 67
from pithos.api.resources import resources
66 68
from pithos.backends.base import (NotAllowedError, QuotaError, ItemNotExists,
67 69
                                  VersionNotExists)
70

  
71
from synnefo.lib import join_urls
72

  
68 73
from astakosclient import AstakosClient
69 74
from astakosclient.errors import NoUserName, NoUUID
70 75

  
......
389 394
def update_public_meta(public, meta):
390 395
    if not public:
391 396
        return
392
    meta['X-Object-Public'] = '/public/' + public
397
    meta['X-Object-Public'] = join_urls(
398
        BASE_URL, reverse('pithos.api.public.public_demux', args=(public,)))
393 399

  
394 400

  
395 401
def validate_modification_preconditions(request, meta):

Also available in: Unified diff