# error: unsupported protocol scheme "ftp"

- **ID:** `go/http-unsupported-protocol-scheme`
- **Domain:** go
- **Category:** config_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

http.Get或http.NewRequest使用了非HTTP/HTTPS的URL方案，如ftp或file。

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 1.21 | active | — | — |

## Workarounds

1. **** (90% success)
   ```
   检查并修正URL：
if !strings.HasPrefix(url, "http://") && !strings.HasPrefix(url, "https://") {
    url = "http://" + url
}
   ```
2. **** (85% success)
   ```
   使用url.Parse验证方案：
parsed, err := url.Parse(rawURL)
if err != nil || (parsed.Scheme != "http" && parsed.Scheme != "https") {
    // 处理错误
}
   ```

## Dead Ends

- **** — http包不处理ftp，需要更换库。 (90% fail)
- **** — 请求永远不会成功。 (100% fail)
