Commit e5232a8
committed
fix: normalize origin URL in verify_endpoints so bare host:port probes work
The CLI accepts --endpoint 127.0.0.1:11434 (no scheme) and passes that
string through to verify_endpoints, which hands it to reqwest. Reqwest's
request builder refuses to build a request from a URL without a scheme
and returns a "builder error" — which our probe was reporting as
"origin not reachable" indefinitely:
✓ proxy responding (0.4s) [https://...]: HTTP 200
… origin not reachable (0s) [127.0.0.1:11434]: builder error
… origin not reachable (10s) [127.0.0.1:11434]: builder error
...
The actual origin was reachable the whole time — the proxy probe got
HTTP 200 through the tunnel back to the same host:port. Only the CLI's
local probe was wedged.
Apply lib::normalize_endpoint (the same canonicalization that
TunnelSummary.endpoint stores) at the top of verify_endpoints so any
bare host:port works as input. The displayed URL becomes the canonical
form (http://127.0.0.1:11434), matching what's stored on the HTTPProxy.
verify_endpoints is on the connect-lib side of the boundary we sketched
in datum-cloud/enhancements#756 comment 4644292554 — defensive
normalization belongs here so other callers (UI Edit dialog, the future
plugin foreground listen path) don't have to remember to canonicalize.1 parent 731e34c commit e5232a8
1 file changed
Lines changed: 7 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1300 | 1300 | | |
1301 | 1301 | | |
1302 | 1302 | | |
| 1303 | + | |
| 1304 | + | |
| 1305 | + | |
| 1306 | + | |
| 1307 | + | |
| 1308 | + | |
1303 | 1309 | | |
1304 | 1310 | | |
1305 | 1311 | | |
| |||
1317 | 1323 | | |
1318 | 1324 | | |
1319 | 1325 | | |
1320 | | - | |
| 1326 | + | |
1321 | 1327 | | |
1322 | 1328 | | |
1323 | 1329 | | |
| |||
0 commit comments