Skip to content

Commit

Permalink
Decodes response and headers as UTF-8 for JSON serialization
Browse files Browse the repository at this point in the history
  • Loading branch information
irl committed Nov 1, 2017
1 parent 299338a commit 11143a9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pathspider/helpers/http.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ def connect_http(source, job, conn_timeout, curlopts=None, curlinfos=None):
'sp': sp,
'spdr_state': CONN_OK,
'http_response_code': code,
'http_response_header': header.getvalue(),
'http_response_body': body.getvalue(),
'http_response_header': header.getvalue().decode('utf-8'),
'http_response_body': body.getvalue().decode('utf-8'),
'http_info': info,
}
except pycurl.error: # TODO: Catch timeout seperately
Expand Down

0 comments on commit 11143a9

Please sign in to comment.