mirror of
https://github.com/projectdiscovery/httpx
synced 2026-06-08 16:50:17 +00:00
fix charset gbk and gb2312
This commit is contained in:
@@ -20,7 +20,8 @@ func ExtractTitle(r *Response) (title string) {
|
||||
contentType := strings.Join(contentTypes, ";")
|
||||
|
||||
// special cases
|
||||
if strings.Contains(contentType, "charset=GB2312") {
|
||||
if strings.Contains(strings.ToLower(contentType), "charset=gb2312") ||
|
||||
strings.Contains(strings.ToLower(contentType), "charset=gbk") {
|
||||
titleUtf8, err := Decodegbk([]byte(title))
|
||||
if err != nil {
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user