add relative-url to urls

db4
Doug Coleman 2008-10-04 13:26:17 -05:00
parent a057da4116
commit 12afcd2c2c
2 changed files with 8 additions and 0 deletions

View File

@ -135,6 +135,12 @@ HELP: relative-url
}
} ;
HELP: relative-url?
{ $values
{ "url" url }
{ "?" "a boolean" } }
{ $description "Tests whether a given url is relative to a domain." } ;
HELP: secure-protocol?
{ $values { "protocol" string } { "?" "a boolean" } }
{ $description "Tests if protocol connections must be made with secure sockets (SSL/TLS)." }

View File

@ -155,6 +155,8 @@ PRIVATE>
f >>host
f >>port ;
: relative-url? ( url -- ? ) protocol>> not ;
! Half-baked stuff follows
: secure-protocol? ( protocol -- ? )
"https" = ;