// Minimal HTTP download test for debugging // Tests net.http.http_download_file() which appears to hang on illumos import net.http import io.file proc main() println("=== HTTP Download Test ===") println("") // Test 1: Simple HTTPS URL (zlib - small file) let url1 = "https://zlib.net/zlib-1.3.1.tar.gz" let dest1 = "/tmp/http_test_zlib.tar.gz" println("Test 1: zlib download (1.5MB)") println("URL: " + url1) println("Calling http_download_file()...") let result1 = http.http_download_file(url1, dest1) if result1 println("SUCCESS: Downloaded to " + dest1) if file.fileExists(dest1) println("File exists: true") end if else println("FAILED: http_download_file returned false") end if println("") // Test 2: GitHub URL (requires redirect handling) let url2 = "https://github.com/vim/vim/archive/refs/tags/v9.1.0.tar.gz" let dest2 = "/tmp/http_test_vim.tar.gz" println("Test 2: GitHub download with redirects (17MB)") println("URL: " + url2) println("Calling http_download_file()...") let result2 = http.http_download_file(url2, dest2) if result2 println("SUCCESS: Downloaded to " + dest2) if file.fileExists(dest2) println("File exists: true") end if else println("FAILED: http_download_file returned false") end if println("") println("=== Test Complete ===") end main