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.53k stars 822 forks source link

redirect chain not displaying correctly for some inputs #1783

Closed Ice3man543 closed 1 month ago

Ice3man543 commented 3 months ago

httpx version:

Current Behavior:

chaos.projectdiscovery.io

Expected Behavior:

Steps To Reproduce:

Anything else:

Mzack9999 commented 2 months ago

It seems to work correctly:

$ go run . -u http://chaos.projectdiscovery.io -duc -json -fr -include-chain -nfs | jq
...
"chain": [
    {
      "request": "GET / HTTP/1.1\r\nHost: chaos.projectdiscovery.io\r\nAccept-Charset: utf-8\r\nUser-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:105.0) Gecko/20100101 Firefox/105.0\r\n\r\n",
      "response": "...",
      "status_code": 301,
      "location": "https://chaos.projectdiscovery.io/",
      "request-url": "http://chaos.projectdiscovery.io"
    },
    {
      "request": "GET / HTTP/0.0\r\nHost: chaos.projectdiscovery.io\r\nAccept-Charset: utf-8\r\nReferer: http://chaos.projectdiscovery.io\r\nUser-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:105.0) Gecko/20100101 Firefox/105.0\r\n\r\n",
      "response": "...",
      "status_code": 200,
      "request-url": "https://chaos.projectdiscovery.io/"
    }
...
ehsandeep commented 1 month ago

Closing as it's not reproducible.