File tree Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -169,11 +169,16 @@ def request_post_mortem(self, response=None):
169
169
if header_api_url :
170
170
header_api_url = StrUtils .eviscerate (header_api_url , '/' )
171
171
172
- if header_api_url and requester_api_url \
173
- and header_api_url != requester_api_url :
174
- reason = "hostname mismatch. %s != %s" % (
175
- header_api_url , requester_api_url
176
- )
172
+ if (
173
+ header_api_url and requester_api_url
174
+ and StrUtils .to_text (header_api_url )
175
+ != StrUtils .to_text (requester_api_url )
176
+ ):
177
+ reason = "hostname mismatch. %s != %s" % tuple (map (
178
+ StrUtils .to_text , [
179
+ header_api_url , requester_api_url
180
+ ]
181
+ ))
177
182
header_url = StrUtils .eviscerate (header_api_url , '/' )
178
183
header_url = StrUtils .eviscerate (
179
184
header_url , self .requester .api )
@@ -188,7 +193,7 @@ def request_post_mortem(self, response=None):
188
193
response .status_code ,
189
194
UrlUtils .beautify_response (response ),
190
195
response_headers ,
191
- request_body [:1000 ]
196
+ StrUtils . to_binary ( request_body ) [:1000 ]
192
197
]))
193
198
if reason :
194
199
msg += "\n Because of %s" % StrUtils .to_binary (reason )
You can’t perform that action at this time.
0 commit comments