From 332e0390116b63bd2a3e3fab7d4c9519d7e4d2ec Mon Sep 17 00:00:00 2001 From: Reid Draper Date: Tue, 19 Jun 2012 17:49:55 -0400 Subject: [PATCH] Add a proper content-type to map reduce requests --- riak/transports/http.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/riak/transports/http.py b/riak/transports/http.py index c77955b6..9e740de9 100644 --- a/riak/transports/http.py +++ b/riak/transports/http.py @@ -236,7 +236,8 @@ def mapred(self, inputs, query, timeout=None): # Do the request... url = "/" + self._mapred_prefix - response = self.http_request('POST', url, {}, content) + headers = {'Content-Type': 'application/json'} + response = self.http_request('POST', url, headers, content) # Make sure the expected status code came back... status = response[0]['http_code']