From b5484d33baf6e50cb2cc557f783b55e55bd45189 Mon Sep 17 00:00:00 2001 From: John Benediktsson Date: Mon, 15 Jul 2013 10:28:28 -0700 Subject: [PATCH] http.client: support urls without protocols (in addition to strings). --- basis/http/client/client.factor | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/basis/http/client/client.factor b/basis/http/client/client.factor index 0f9cbc448c..1799485e43 100644 --- a/basis/http/client/client.factor +++ b/basis/http/client/client.factor @@ -142,7 +142,8 @@ SYMBOL: redirects : request-url ( url -- url' ) dup >url dup protocol>> [ nip ] [ - drop "http://" prepend >url + drop dup url? [ present ] when + "http://" prepend >url ] if ensure-port ; : ( url method -- request )