Skip to content

Commit

Permalink
Encode request and resopnse in RequestRecorder
Browse files Browse the repository at this point in the history
  • Loading branch information
tw4l committed May 14, 2024
1 parent 8b09d29 commit 872e63e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions warcio/capture_http.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,11 +165,11 @@ def set_remote_ip(self, remote_ip):

def write_request(self, buff):
if self.started_req:
self.request_out.write(buff)
self.request_out.write(buff.encode())

def write_response(self, buff):
if self.started_req:
self.response_out.write(buff)
self.response_out.write(buff.encode())

def _create_record(self, out, record_type):
length = out.tell()
Expand Down

0 comments on commit 872e63e

Please sign in to comment.