You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Non iconv conversion of non utf-8 encoded pages now works. Fixed other encoding issues and various Content-Type header problems. ParseContentType now turns everything into lowercase.
return&reqError{err, "Couldn't read returned body.", 500}
87
87
}
88
88
89
-
copyHeaders(resWriter.Header(), httpCliResp.Header) // Copy headers from response to our request from the server we are proxying
90
-
91
89
prox.ConType, err=parseContentType(httpCliResp.Header.Get("Content-Type")) // Get the MIME type of what we recieved from the Content-Type header
92
90
iferr!=nil {
93
91
prox.ConType, err=parseContentType(http.DetectContentType(prox.Body)) // Looks like we couldn't parse the Content-Type header, so we'll have to detect content type from the actual response body
prox.Document, err=goquery.NewDocumentFromReader(decoder.Reader(resReader)) // Parse the response from our target website whose body has been freshly utf-8 encoded
113
132
iferr!=nil { // Looks like we can't parse this, let's just spit out the raw response
0 commit comments