add feed:// since firefox and safari support it, throw a better error than "fall-through in case"

db4
Doug Coleman 2008-09-21 11:58:09 -05:00
parent c017377a1d
commit c5a3f89b04
1 changed files with 4 additions and 0 deletions
basis/urls

View File

@ -212,11 +212,15 @@ PRIVATE>
[ [ host>> ] [ port>> ] bi <inet> ] [ protocol>> ] bi
secure-protocol? [ <secure> ] 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' )