Skip to content

Commit 6abbc88

Browse files
committed
Merge remote-tracking branch 'origin/master' into PENG-3135/add_redirect
2 parents b805856 + 30587f8 commit 6abbc88

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## 0.19.1 (May 15th, 2024)
2+
3+
BUG FIXES:
4+
* Fixed twisted transport to pass correct encoding on the body.
5+
16
## 0.19.0 (February 14th, 2024)
27

38
ENHANCEMENTS:

ns1/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#
66
from .config import Config
77

8-
version = "0.19.0"
8+
version = "0.19.1"
99

1010

1111
class NS1:

ns1/rest/transport/twisted.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,9 @@
1414
from ns1.rest.errors import ResourceException
1515
from ns1.rest.transport.base import TransportBase
1616

17-
17+
IS_PY3 = False
1818
if sys.version_info[0] == 3:
19+
IS_PY3 = True
1920
from io import StringIO
2021
from urllib.parse import urlencode
2122
else:
@@ -230,7 +231,10 @@ def _request_func(self, method, headers, data, files):
230231
"""
231232
bProducer = None
232233
if data:
233-
bProducer = StringProducer(data)
234+
if IS_PY3:
235+
bProducer = StringProducer(data.encode("utf-8"))
236+
else:
237+
bProducer = StringProducer(data)
234238
elif files:
235239
if len(files) > 1:
236240
raise Exception(

0 commit comments

Comments
 (0)