bpo-33497: Add errors param to cgi.parse_multipart and make an encoding in FieldStorage use the given errors (GH-6804) (GH-6837)
(cherry picked from commit 545c955be997efd6b3827b981024e6b9945d82d1)
Co-authored-by: Amber Brown <hawkowl@atleastfornow.net>
diff --git a/Doc/library/cgi.rst b/Doc/library/cgi.rst
index 17386b8..0b1aead 100644
--- a/Doc/library/cgi.rst
+++ b/Doc/library/cgi.rst
@@ -296,7 +296,7 @@
instead. It is maintained here only for backward compatibility.
-.. function:: parse_multipart(fp, pdict, encoding="utf-8")
+.. function:: parse_multipart(fp, pdict, encoding="utf-8", errors="replace")
Parse input of type :mimetype:`multipart/form-data` (for file uploads).
Arguments are *fp* for the input file, *pdict* for a dictionary containing
@@ -312,8 +312,8 @@
which is much more flexible.
.. versionchanged:: 3.7
- Added the *encoding* parameter. For non-file fields, the value is now
- a list of strings, not bytes.
+ Added the *encoding* and *errors* parameters. For non-file fields, the
+ value is now a list of strings, not bytes.
.. function:: parse_header(string)