Code

Ticket #6308: against_post_heaping_patch.diff

File against_post_heaping_patch.diff, 696 bytes (added by Yasushi Masuda <whosaysni@…>, 6 years ago)

A patch fixing POST data heaping

Line 
1Index: django/http/__init__.py
2===================================================================
3--- django/http/__init__.py     (revision 7152)
4+++ django/http/__init__.py     (working copy)
5@@ -174,9 +174,10 @@
6     def __deepcopy__(self, memo={}):
7         import copy
8         result = self.__class__('', mutable=True)
9-        memo[id(self)] = result
10+        m = dict(memo.items())
11+        m[id(self)] = result
12         for key, value in dict.items(self):
13-            dict.__setitem__(result, copy.deepcopy(key, memo), copy.deepcopy(value, memo))
14+            dict.__setitem__(result, copy.deepcopy(key, m), copy.deepcopy(value, m))
15         return result
16 
17     def setlist(self, key, list_):