autotest: raw_post_data -> body (address django DeprecationWarning)
BUG=chromium:711808
TEST=None
Change-Id: I66e4b5c39c7cbfceeed61a148cbf9943c4076854
Reviewed-on: https://chromium-review.googlesource.com/479694
Commit-Ready: Aviv Keshet <akeshet@chromium.org>
Tested-by: Aviv Keshet <akeshet@chromium.org>
Reviewed-by: Prathmesh Prabhu <pprabhu@chromium.org>
diff --git a/frontend/afe/rpc_handler.py b/frontend/afe/rpc_handler.py
index ca7e7ac..d379432 100644
--- a/frontend/afe/rpc_handler.py
+++ b/frontend/afe/rpc_handler.py
@@ -152,7 +152,7 @@
@param request: the request to get raw data from.
"""
if request.method == 'POST':
- return request.raw_post_data
+ return request.body
return urllib.unquote(request.META['QUERY_STRING'])
diff --git a/frontend/afe/views.py b/frontend/afe/views.py
index b2acfeb..e85af5c 100644
--- a/frontend/afe/views.py
+++ b/frontend/afe/views.py
@@ -69,7 +69,7 @@
headers, content = httplib2.Http().request(url, 'GET')
else:
headers, content = httplib2.Http().request(url, 'POST',
- body=request.raw_post_data)
+ body=request.body)
http_response = HttpResponse(content)
for header, value in headers.iteritems():
if header not in ('connection',):