#1075893 curl: -L does not have effect when a 404 is coupled with a redirect to a parking service

Package:
curl
Source:
curl
Description:
command line tool for transferring data with URL syntax
Submitter:
Manny
Date:
2024-07-07 10:12:04 UTC
Severity:
normal
Tags:
#1075893#5
Date:
2024-07-07 10:08:29 UTC
From:
To:
cURL neglects to follow a redirection for a particular URL
(“http://lawlita.com/”) which was originally a disposable email
service at one point but no longer exists. When visiting that URL in a
GUI browser, it instantly redirects to a “parking” service
(“https://www.hugedomains.com/domain_profile.cfm?d=lawlita.com”). But
cURL stops short of finding that:

===8<------------------------------
$ curl -vvvvv --ssl --socks4a 127.0.0.1:9050 --connect-timeout 240 -L --head -w '(%{url} [aka %{redirect_url}] → [effective URL] "%{url_effective}")' --globoff http://lawlita.com
Warning: --ssl is an insecure option, consider --ssl-reqd instead
*   Trying 127.0.0.1:9050...
* Connected to 127.0.0.1 (127.0.0.1) port 9050 (#0)
* SOCKS4 communication to lawlita.com:80
* SOCKS4a request granted.
* Connected to 127.0.0.1 (127.0.0.1) port 9050 (#0)
* HTTP 1.0, assume close after body
< HTTP/1.0 404 Not Found
HTTP/1.0 404 Not Found
< cache-control: no-cache
cache-control: no-cache
< content-type: text/html
content-type: text/html
< x-reason: UnsupportedMethod
x-reason: UnsupportedMethod

<
* Closing connection 0
(http://lawlita.com [aka ] → [effective URL] "http://lawlita.com/")
===8<------------------------------

My guess is cURL sees a 404 error and gives up early.