File tree Expand file tree Collapse file tree 2 files changed +3
-5
lines changed Expand file tree Collapse file tree 2 files changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,8 @@ Source code is also available at: https://github.com/snowflakedb/snowflake-conne
14
14
- Release wheels are now built on manylinux2014
15
15
- Bumped supported pyarrow version to >=8.0.0,<8.1.0
16
16
- Added overwrite option to write_pandas
17
+ - Fixed a bug where gzip compressed http requests might be garbled by an unflushed buffer
18
+
17
19
18
20
19
21
- v2.7.9(June 26,2022)
Original file line number Diff line number Diff line change 14
14
import time
15
15
import traceback
16
16
import uuid
17
- from io import BytesIO
18
17
from threading import Lock
19
18
from typing import TYPE_CHECKING
20
19
@@ -1007,11 +1006,8 @@ def _request_exec(
1007
1006
logger .debug ("socket timeout: %s" , socket_timeout )
1008
1007
try :
1009
1008
if not catch_okta_unauthorized_error and data and len (data ) > 0 :
1010
- gzdata = BytesIO ()
1011
- gzip .GzipFile (fileobj = gzdata , mode = "wb" ).write (data .encode ("utf-8" ))
1012
- gzdata .seek (0 , 0 )
1013
1009
headers ["Content-Encoding" ] = "gzip"
1014
- input_data = gzdata
1010
+ input_data = gzip . compress ( data . encode ( "utf-8" ))
1015
1011
else :
1016
1012
input_data = data
1017
1013
You can’t perform that action at this time.
0 commit comments