
functions
files
intro
|
|
yast2 |
modules/URL.ycp |
| Manipulate and Parse URLs |
|
|
|
|
TODO:
- read URI(3)
- esp. compare the regex mentioned in the URI(3) with ours:
my($scheme, $authority, $path, $query, $fragment) =
$uri =~ m|^(?:([^:/?#]+):)?(?://([^/?#]*))?([^?#]*)(?:\?([^#]*))?(?:#(.*))?|;
|
global Parse (string url) -> map
|
|
Tokenize URL
- Parameters:
- Return value:
- Example:
-
Parse("http://name:pass@www.suse.cz:80/path/index.html?question#part") ->
$[
"scheme" : "http",
"host" : "www.suse.cz"
"port" : "80",
"path" : /path/index.html",
"user" : "name",
"pass" : "pass",
"query" : "question",
"fragment": "part"
] |
|
global Check (string url) -> boolean
|
|
Check URL
- Parameters:
- Return value:
- See:
-
|
global Build (map tokens) -> string
|
|
Build URL from tokens as parsed with Parse
- Parameters:
- Return value:
|
|
url, empty string if invalid data is used to build the url. |
- See:
-
|