File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -86,7 +86,7 @@ def serialize_into(
86
86
self , f # type: Any
87
87
):
88
88
# type: (...) -> None
89
- f .write (json .dumps (self .headers ).encode ("utf-8" ))
89
+ f .write (json .dumps (self .headers , allow_nan = False ).encode ("utf-8" ))
90
90
f .write (b"\n " )
91
91
for item in self .items :
92
92
item .serialize_into (f )
@@ -142,7 +142,7 @@ def get_bytes(self):
142
142
with open (self .path , "rb" ) as f :
143
143
self .bytes = f .read ()
144
144
elif self .json is not None :
145
- self .bytes = json .dumps (self .json ).encode ("utf-8" )
145
+ self .bytes = json .dumps (self .json , allow_nan = False ).encode ("utf-8" )
146
146
else :
147
147
self .bytes = b""
148
148
return self .bytes
@@ -256,7 +256,7 @@ def serialize_into(
256
256
headers = dict (self .headers )
257
257
length , writer = self .payload ._prepare_serialize ()
258
258
headers ["length" ] = length
259
- f .write (json .dumps (headers ).encode ("utf-8" ))
259
+ f .write (json .dumps (headers , allow_nan = False ).encode ("utf-8" ))
260
260
f .write (b"\n " )
261
261
writer (f )
262
262
f .write (b"\n " )
You can’t perform that action at this time.
0 commit comments