projectdiscovery / httpx

httpx is a fast and multi-purpose HTTP toolkit that allows running multiple probes using the retryablehttp library.
https://docs.projectdiscovery.io/tools/httpx
MIT License
7.6k stars 825 forks source link

bug: gb2312 character set not handled correctly #1546

Open hktalent opened 9 months ago

hktalent commented 9 months ago

bug: gb2312 character set not handled correctly

response:

HTTP/1.1 304 Not Modified
Server: nginx
Date: Fri, 19 Jan 2024 07:28:59 GMT
Last-Modified: Mon, 14 Dec 2020 02:24:04 GMT
Connection: keep-alive
ETag: "5fd6ccc4-411"
Strict-Transport-Security: max-age=0; includeSubDomains

html:

<!-- <!DOCTYPE html>
<html>
<head>
<title>Welcome to nginx!</title>
<style>
    body {
        width: 35em;
        margin: 0 auto;
        font-family: Tahoma, Verdana, Arial, sans-serif;
    }
</style>
</head>
<body>
<h1>Welcome to nginx!</h1>
<p>If you see this page, the nginx web server is successfully installed and
working. Further configuration is required.</p>

<p>For online documentation and support please refer to
<a href="http://nginx.org/">nginx.org</a>.<br/>
Commercial support is available at
<a href="http://nginx.com/">nginx.com</a>.</p>

<p><em>Thank you for using nginx.</em></p>
</body>
<script type="text/javascript">

</script>
</html>
 -->
 <html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
        <title>内部信息管理平台</title>
    </head>
    <style type="text/css">
        img{
            position: absolute;
            top: 50%;
            left: 50%;
            margin-top: -248px;
            margin-left: -408px;
        }
    </style>
    <body>
        <img src="[http://192.168.10.177:7080/404.png](view-source:http://192.168.10.177:7080/404.png)">
    </body>
</html>

out json

{...
"title":"鍐呴儴淇℃伅绠$悊骞冲彴",
...
}
olearycrew commented 9 months ago

@hktalent thanks for this issue - our team will take a look.