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?
|
HELP: secure-protocol?
|
||||||
{ $values { "protocol" string } { "?" "a boolean" } }
|
{ $values { "protocol" string } { "?" "a boolean" } }
|
||||||
{ $description "Tests if protocol connections must be made with secure sockets (SSL/TLS)." }
|
{ $description "Tests if protocol connections must be made with secure sockets (SSL/TLS)." }
|
||||||
|
|
|
@ -155,6 +155,8 @@ PRIVATE>
|
||||||
f >>host
|
f >>host
|
||||||
f >>port ;
|
f >>port ;
|
||||||
|
|
||||||
|
: relative-url? ( url -- ? ) protocol>> not ;
|
||||||
|
|
||||||
! Half-baked stuff follows
|
! Half-baked stuff follows
|
||||||
: secure-protocol? ( protocol -- ? )
|
: secure-protocol? ( protocol -- ? )
|
||||||
"https" = ;
|
"https" = ;
|
||||||
|
|
Loading…
Reference in New Issue