mirror of
https://github.com/zeek/zeek.git
synced 2025-10-03 07:08:19 +00:00

I'd expect the portnum component to remain uninitialized in case the given URI specifies no port number -- however, decompose_uri() raises an error instead. Will address this in a subsequent commit.
20 lines
No EOL
771 B
Text
20 lines
No EOL
771 B
Text
# @TEST-EXEC: zeek %INPUT >output
|
|
# @TEST-EXEC: btest-diff output
|
|
|
|
# This is loaded by default.
|
|
#@load base/utils/urls
|
|
|
|
print decompose_uri("https://www.example.com/");
|
|
print decompose_uri("http://example.com:99/test//?foo=bar");
|
|
print decompose_uri("ftp://1.2.3.4/pub/files/something.exe");
|
|
print decompose_uri("http://hyphen-example.com/index.asp?q=123");
|
|
print decompose_uri("git://git.kernel.org:/pub/scm/linux/");
|
|
|
|
# This is mostly undefined behavior but it doesn't give any
|
|
# reporter messages at least.
|
|
print decompose_uri("dfasjdfasdfasdf?asd");
|
|
|
|
# These aren't supported yet.
|
|
#print decompose_uri("mailto:foo@bar.com?subject=test!");
|
|
#print decompose_uri("http://example.com/?test=ampersand&test");
|
|
#print decompose_uri("http://user:password@example.com/"); |