Revision b9818693 snf-pithos-app/pithos/api/delegate.py
b/snf-pithos-app/pithos/api/delegate.py | ||
---|---|---|
67 | 67 |
return HttpResponseRedirect(uri) |
68 | 68 |
|
69 | 69 |
|
70 |
def proxy(request, url, headers={}, body=None):
|
|
70 |
def proxy(request, url, headers=None, body=None):
|
|
71 | 71 |
p = urlparse(url) |
72 | 72 |
|
73 | 73 |
kwargs = {} |
74 |
kwargs['headers'] = headers |
|
74 |
if headers is None: |
|
75 |
headers = {} |
|
76 |
kwargs["headers"] = headers |
|
75 | 77 |
kwargs['headers'].update(request.META) |
76 | 78 |
kwargs['body'] = body |
77 | 79 |
kwargs['headers'].setdefault('content-type', 'application/json') |
Also available in: Unified diff