From c5a3f89b0409487b8bc1e178d635f668efa4405f Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Sun, 21 Sep 2008 11:58:09 -0500 Subject: [PATCH] add feed:// since firefox and safari support it, throw a better error than "fall-through in case" --- basis/urls/urls.factor | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/basis/urls/urls.factor b/basis/urls/urls.factor index 4f2639975b..f4a6a7d792 100644 --- a/basis/urls/urls.factor +++ b/basis/urls/urls.factor @@ -212,11 +212,15 @@ PRIVATE> [ [ host>> ] [ port>> ] bi ] [ protocol>> ] bi secure-protocol? [ ] when ; +ERROR: no-protocol-found protocol ; + : protocol-port ( protocol -- port ) { { "http" [ 80 ] } { "https" [ 443 ] } + { "feed" [ 80 ] } { "ftp" [ 21 ] } + [ no-protocol-found ] } case ; : ensure-port ( url -- url' )