diff --git a/morty.go b/morty.go index a949331..822f8e5 100644 --- a/morty.go +++ b/morty.go @@ -208,7 +208,7 @@ func (p *Proxy) RequestHandler(ctx *fasthttp.RequestCtx) { log.Println("getting", requestURIStr) req.SetRequestURI(requestURIStr) - req.Header.SetUserAgentBytes([]byte("Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36")) + req.Header.SetUserAgentBytes([]byte("Mozilla/5.0 (Windows NT 10.0; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0")) resp := fasthttp.AcquireResponse() defer fasthttp.ReleaseResponse(resp) @@ -500,7 +500,10 @@ func sanitizeHTML(rc *RequestConfig, out io.Writer, htmlDoc []byte) { sanitizeHTML(rc, out, decoder.Raw()) } - case html.DoctypeToken, html.CommentToken: + case html.CommentToken: + // ignore comment. TODO : parse IE conditional comment + + case html.DoctypeToken: out.Write(decoder.Raw()) } } else {