Revert "Try parsing HTML even if content-type is empty."

This reverts commit f384fc2c
This commit is contained in:
Musab Gültekin
2019-06-18 13:03:00 +03:00
parent f384fc2c13
commit 936d157785
2 changed files with 15 additions and 1 deletions

View File

@ -43,7 +43,7 @@ func defaultHeadersMiddleware(g *Geziyor, r *Request) {
// parseHTMLMiddleware parses response if response is HTML
func parseHTMLMiddleware(g *Geziyor, r *Response) {
if !g.Opt.ParseHTMLDisabled {
if !g.Opt.ParseHTMLDisabled && r.isHTML() {
r.DocHTML, _ = goquery.NewDocumentFromReader(bytes.NewReader(r.Body))
}
}