Response header support added for Chrome Rendering

This commit is contained in:
Musab Gültekin
2019-06-18 16:26:40 +03:00
parent 217f3c96df
commit ec83a92eb3
4 changed files with 12 additions and 4 deletions

View File

@@ -29,9 +29,6 @@ func (r *Response) JoinURL(relativeURL string) string {
}
func (r *Response) isHTML() bool {
if r.Response == nil {
return len(r.Body) != 0
}
contentType := r.Header.Get("Content-Type")
for _, htmlContentType := range []string{"text/html", "application/xhtml+xml", "application/vnd.wap.xhtml+xml"} {
if strings.Contains(contentType, htmlContentType) {