From 5a3848515e362c8ed2683885513fa439c779967d Mon Sep 17 00:00:00 2001 From: John Benediktsson Date: Sat, 16 Apr 2016 17:11:01 -0700 Subject: [PATCH] urls: remove unnecessary >secure-addr indirection. --- basis/urls/urls.factor | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/basis/urls/urls.factor b/basis/urls/urls.factor index 3e38224522..5f31a0c27d 100644 --- a/basis/urls/urls.factor +++ b/basis/urls/urls.factor @@ -168,22 +168,16 @@ PRIVATE> : secure-protocol? ( protocol -- ? ) "https" = ; -secure-addr 1 ( addrspec host -- addrspec' ) - -PRIVATE> - : url-addr ( url -- addr ) [ [ host>> ] [ port>> ] [ protocol>> protocol-port ] tri or - ] - [ host>> ] - [ protocol>> ] tri - secure-protocol? [ >secure-addr ] [ drop ] if ; + ] [ + dup protocol>> secure-protocol? + [ host>> ] [ drop ] if + ] bi ; : set-url-addr ( url addr -- url ) [ host>> >>host ] [ port>> >>port ] bi ; @@ -191,11 +185,6 @@ PRIVATE> : ensure-port ( url -- url' ) clone dup protocol>> '[ _ protocol-port or ] change-port ; -! Secure sockets -UNION: abstract-inet inet inet4 inet6 ; - -M: abstract-inet >secure-addr ; - ! Literal syntax SYNTAX: URL" lexer get skip-blank parse-string >url suffix! ;