add feed:// since firefox and safari support it, throw a better error than "fall-through in case"
parent
c017377a1d
commit
c5a3f89b04
|
@ -212,11 +212,15 @@ PRIVATE>
|
||||||
[ [ host>> ] [ port>> ] bi <inet> ] [ protocol>> ] bi
|
[ [ host>> ] [ port>> ] bi <inet> ] [ protocol>> ] bi
|
||||||
secure-protocol? [ <secure> ] when ;
|
secure-protocol? [ <secure> ] when ;
|
||||||
|
|
||||||
|
ERROR: no-protocol-found protocol ;
|
||||||
|
|
||||||
: protocol-port ( protocol -- port )
|
: protocol-port ( protocol -- port )
|
||||||
{
|
{
|
||||||
{ "http" [ 80 ] }
|
{ "http" [ 80 ] }
|
||||||
{ "https" [ 443 ] }
|
{ "https" [ 443 ] }
|
||||||
|
{ "feed" [ 80 ] }
|
||||||
{ "ftp" [ 21 ] }
|
{ "ftp" [ 21 ] }
|
||||||
|
[ no-protocol-found ]
|
||||||
} case ;
|
} case ;
|
||||||
|
|
||||||
: ensure-port ( url -- url' )
|
: ensure-port ( url -- url' )
|
||||||
|
|
Loading…
Reference in New Issue