Revision 479c3051 snf-pithos-app/pithos/api/delegate.py
b/snf-pithos-app/pithos/api/delegate.py | ||
---|---|---|
34 | 34 |
import logging |
35 | 35 |
|
36 | 36 |
from urlparse import urlparse |
37 |
import urllib |
|
38 |
import urllib2 |
|
39 | 37 |
|
40 | 38 |
from django.http import ( |
41 |
HttpResponseNotFound, HttpResponseRedirect, HttpResponseBadRequest, |
|
42 |
HttpResponse) |
|
39 |
HttpResponseNotFound, HttpResponseRedirect, HttpResponse) |
|
43 | 40 |
from django.utils.http import urlencode |
44 | 41 |
from django.views.decorators.csrf import csrf_exempt |
45 | 42 |
|
... | ... | |
86 | 83 |
status = int(response.status) |
87 | 84 |
return HttpResponse(data, status=status) |
88 | 85 |
|
86 |
|
|
89 | 87 |
@csrf_exempt |
90 | 88 |
def delegate_to_feedback_service(request): |
91 | 89 |
token = request.META.get('HTTP_X_AUTH_TOKEN') |
... | ... | |
93 | 91 |
return proxy( |
94 | 92 |
request, USER_FEEDBACK_URL, headers=headers, body=request.raw_post_data) |
95 | 93 |
|
94 |
|
|
96 | 95 |
@csrf_exempt |
97 | 96 |
def delegate_to_user_catalogs_service(request): |
98 | 97 |
token = request.META.get('HTTP_X_AUTH_TOKEN') |
Also available in: Unified diff