Steps
- Run curl --version and check option support. Replace the example URL with an authorized public download.
- In Bash run curl --fail-with-body --max-time 30 -o response.tmp -w "HTTP=%{http_code}\n" https://example.com/ and immediately run echo $? to record the exit code. This option requires curl 7.76.0 or later.
- Keep the status and a redacted error excerpt. Continue only after checking the expected file. Older versions can use --fail, which omits HTTP error bodies.
Interpret results
Default curl can successfully transfer a 404 or 500 page. With --fail-with-body, HTTP errors at 400 or above normally produce exit code 22 while retaining the body. Interpret both values together.
Scope and next actions
Even HTTP success needs file-type and official checksum checks. Do not rename an error page as an installer; this test does not establish overall VPN health.