add relative-url to urls
parent
a057da4116
commit
12afcd2c2c
|
@ -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)." }
|
||||
|
|
|
@ -155,6 +155,8 @@ PRIVATE>
|
|||
f >>host
|
||||
f >>port ;
|
||||
|
||||
: relative-url? ( url -- ? ) protocol>> not ;
|
||||
|
||||
! Half-baked stuff follows
|
||||
: secure-protocol? ( protocol -- ? )
|
||||
"https" = ;
|
||||
|
|
Loading…
Reference in New Issue