Revision 486b2dc2
b/pithos/api/functions.py | ||
---|---|---|
35 | 35 |
import logging |
36 | 36 |
import hashlib |
37 | 37 |
|
38 |
from django.conf import settings |
|
38 | 39 |
from django.http import HttpResponse |
39 | 40 |
from django.template.loader import render_to_string |
40 | 41 |
from django.utils import simplejson as json |
... | ... | |
115 | 116 |
if not x_auth_user or not x_auth_key: |
116 | 117 |
raise BadRequest('Missing X-Auth-User or X-Auth-Key header') |
117 | 118 |
response = HttpResponse(status=204) |
118 |
response['X-Auth-Token'] = '0000' |
|
119 |
inv_auth_tokens = dict((v, k) for k, v in settings.AUTH_TOKENS.items()) |
|
120 |
response['X-Auth-Token'] = inv_auth_tokens.get(x_auth_user, '0000') |
|
119 | 121 |
response['X-Storage-Url'] = os.path.join(request.build_absolute_uri(), 'demo') |
120 | 122 |
return response |
121 | 123 |
|
Also available in: Unified diff