httpx
httpx copied to clipboard
content-length is 0
I found during testing that the content-length parameter gets a value of zero
echo www.ksyun.com|httpx -cl
> https://www.ksyun.com [0]
echo www.baidu.com|httpx -cl
> https://www.baidu.com [0]
echo https://www.ksyun.com|httpx -cl
> https://www.ksyun.com [0]
echo https://www.baidu.com|httpx -cl
> https://www.baidu.com [227]
@alchu4n could you pleas repeat the same steps but using the -debug
flag? This might be working as expected.
-debug display request/response content in cli
echo www.ksyun.com|httpx -cl -debug
[INF] Current httpx version v1.3.0 (latest)
[INF] Dumped HTTP request for https://www.ksyun.com
GET / HTTP/1.1
Host: www.ksyun.com
User-Agent: Mozilla/5.0 (Linux; U; Android 1.6; en-us; HTC_TATTOO_A3288 Build/DRC79) AppleWebKit/528.5 (KHTML, like Gecko) Version/3.1.2 Mobile Safari/525.20.1
Accept-Charset: utf-8
Accept-Encoding: gzip
[INF] Dumped HTTP response for https://www.ksyun.com
HTTP/1.1 200 OK
Connection: close
Transfer-Encoding: chunked
Alt-Svc: h3=":443"; ma=86400, h3-29=":443"; ma=86400
Cf-Cache-Status: DYNAMIC
Cf-Ray: 7bf3a458597596bd-SJC
Content-Type: text/html; charset=utf-8
Date: Sat, 29 Apr 2023 01:06:22 GMT
Server: cloudflare
Vary: Accept-Encoding
Vary: Origin
X-Content-Type-Options: nosniff
X-Download-Options: noopen
X-Readtime: 65
X-Xss-Protection: 1; mode=block
f890
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>金山云-全球高品质云服务专家</title>
........
......
...
<script defer src="https://static.cloudflareinsights.com/beacon.min.js/v52afc6f149f6479b8c77fa569edb01181681764108816" integrity="sha512-jGCTpDpBAYDGNYR5ztKt4BQPGef1P0giN6ZGVUi835kFF88FOmmn8jBQWNgrNd8g/Yu421NdgWhwQoaOPFflDw==" data-cf-beacon='{"rayId":"7bf3a458597596bd","version":"2023.3.0","b":1,"token":"7292f6b4e86d4cacb64e50e12d73e46d","si":100}' crossorigin="anonymous"></script>
</body>
</html>
0
https://www.ksyun.com [0]
Hi @alchu4n - This seems to be resolved in the current HEAD
of the project. My best guess is this was caused by a WAF on the servers.
$ echo https://www.baidu.com|httpx -cl -silent
https://www.baidu.com [392394]
$ echo https://www.baidu.com|httpx -cl -silent
https://www.baidu.com [392475]
$ echo www.ksyun.com|httpx -cl -silent
https://www.ksyun.com [122505]
$ echo www.ksyun.com|httpx -cl -silent
https://www.ksyun.com [122507]
cc @ehsandeep
can confirm:
echo www.baidu.com|httpx -cl
__ __ __ _ __
/ /_ / /_/ /_____ | |/ /
/ __ \/ __/ __/ __ \| /
/ / / / /_/ /_/ /_/ / |
/_/ /_/\__/\__/ .___/_/|_|
/_/
projectdiscovery.io
[INF] Current httpx version v1.3.3 (latest)
http://www.baidu.com [270]
katana $echo https://www.ksyun.com|httpx -cl
__ __ __ _ __
/ /_ / /_/ /_____ | |/ /
/ __ \/ __/ __/ __ \| /
/ / / / /_/ /_/ /_/ / |
/_/ /_/\__/\__/ .___/_/|_|
/_/
projectdiscovery.io
[INF] Current httpx version v1.3.3 (latest)
https://www.ksyun.com [122502]
Thanks, @jimen0 for the update.