Skip to content

Commit

Permalink
[ActiveX] MicrosoftXMLHTTP performance optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
buffer committed May 9, 2022
1 parent 27df5a2 commit 6ce3321
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions thug/ActiveX/modules/MicrosoftXMLHTTP.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,9 @@ def send(self, varBody = None):
if contenttype is None: # pragma: no cover
return 0

self.dispatchEvent("load")
self.dispatchEvent("readystatechange")
if 'text/css' not in contenttype:
self.dispatchEvent("load")
self.dispatchEvent("readystatechange")

if 'javascript' in contenttype:
html = tostring(E.HTML(E.HEAD(), E.BODY(E.SCRIPT(response.text))))
Expand Down

0 comments on commit 6ce3321

Please sign in to comment.