Explain the use of charset parameter with Content-Type header. Issue11082
diff --git a/Lib/urllib/request.py b/Lib/urllib/request.py
index 94b713e..fe2cfcd 100644
--- a/Lib/urllib/request.py
+++ b/Lib/urllib/request.py
@@ -1062,8 +1062,9 @@
if request.data is not None: # POST
data = request.data
if isinstance(data, str):
- raise TypeError("POST data should be bytes"
- " or an iterable of bytes. It cannot be str.")
+ msg = "POST data should be bytes or an iterable of bytes."\
+ "It cannot be str"
+ raise TypeError(msg)
if not request.has_header('Content-type'):
request.add_unredirected_header(
'Content-type',