diff --git a/django/http/__init__.py b/django/http/__init__.py
index 60b6d15..033a0c1 100644
a
|
b
|
class QueryDict(MultiValueDict):
|
190 | 190 | dict.__setitem__(result, copy.deepcopy(key, memo), copy.deepcopy(value, memo)) |
191 | 191 | return result |
192 | 192 | |
| 193 | def __getstate__(self): |
| 194 | obj_dict = super(QueryDict, self).__getstate__() |
| 195 | obj_dict['_mutable'] = self._mutable |
| 196 | return obj_dict |
| 197 | |
| 198 | def __setstate__(self, obj_dict): |
| 199 | data = obj_dict.pop('_data', []) |
| 200 | for k, v in data.items(): |
| 201 | self.setlist(k, v) |
| 202 | self.__dict__.update(obj_dict) |
| 203 | |
193 | 204 | def setlist(self, key, list_): |
194 | 205 | self._assert_mutable() |
195 | 206 | key = str_to_unicode(key, self.encoding) |
diff --git a/django/utils/datastructures.py b/django/utils/datastructures.py
index 5837c3d..d88e7b0 100644
a
|
b
|
class MultiValueDict(dict):
|
222 | 222 | dict.__setitem__(result, copy.deepcopy(key, memo), |
223 | 223 | copy.deepcopy(value, memo)) |
224 | 224 | return result |
225 | | |
| 225 | |
| 226 | def __getstate__(self): |
| 227 | obj_dict = self.__dict__.copy() |
| 228 | obj_dict['_data'] = dict([(k, self.getlist(k)) for k in self]) |
| 229 | return obj_dict |
| 230 | |
| 231 | def __setstate__(self, obj_dict): |
| 232 | data = obj_dict.pop('_data', []) |
| 233 | for k, v in data.items(): |
| 234 | self.setlist(k, v) |
| 235 | self.__dict__.update(obj_dict) |
| 236 | |
226 | 237 | def get(self, key, default=None): |
227 | 238 | """ |
228 | 239 | Returns the last data value for the passed key. If key doesn't exist |
diff --git a/tests/regressiontests/httpwrappers/tests.py b/tests/regressiontests/httpwrappers/tests.py
index 844b356..49b104b 100644
a
|
b
|
u'\ufffd'
|
400 | 400 | >>> q1 = pickle.loads(pickle.dumps(q, 2)) |
401 | 401 | >>> q == q1 |
402 | 402 | True |
| 403 | >>> q = QueryDict('a=b&c=d&a=1') |
| 404 | >>> q1 = pickle.loads(pickle.dumps(q, 2)) |
| 405 | >>> q == q1 |
| 406 | True |
403 | 407 | |
404 | 408 | ###################################### |
405 | 409 | # HttpResponse with Unicode headers # |