You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1013 lines
27 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

---
test case: 'Regular 127.0.0.1'
in:
key: 'web.page.get[127.0.0.1]'
test_type: both
out:
return: SYSINFO_RET_OK
req: "GET / HTTP/1.1\r\nHost: 127.0.0.1\r\nConnection: close\r\n\r\n"
url: "http://127.0.0.1:80/"
---
test case: 'Regular 127.0.0.1,'
in:
key: 'web.page.get[127.0.0.1, ]'
test_type: both
out:
return: SYSINFO_RET_OK
req: "GET / HTTP/1.1\r\nHost: 127.0.0.1\r\nConnection: close\r\n\r\n"
url: "http://127.0.0.1:80/"
---
test case: 'Regular 127.0.0.1, ,80'
in:
key: 'web.page.get[127.0.0.1, ,80]'
test_type: both
out:
return: SYSINFO_RET_OK
req: "GET / HTTP/1.1\r\nHost: 127.0.0.1\r\nConnection: close\r\n\r\n"
url: "http://127.0.0.1:80/"
---
test case: 'Regular 127.0.0.1, /,80'
in:
key: 'web.page.get[127.0.0.1, /,80]'
test_type: both
out:
return: SYSINFO_RET_OK
req: "GET / HTTP/1.1\r\nHost: 127.0.0.1\r\nConnection: close\r\n\r\n"
url: "http://127.0.0.1:80/"
---
test case: 'Regular 127.0.0.1, zabbix,80'
in:
key: 'web.page.get[127.0.0.1, zabbix,80]'
test_type: both
out:
return: SYSINFO_RET_OK
req: "GET /zabbix HTTP/1.1\r\nHost: 127.0.0.1\r\nConnection: close\r\n\r\n"
url: "http://127.0.0.1:80/zabbix"
---
test case: 'Regular 127.0.0.1,zabbix'
in:
key: 'web.page.get[127.0.0.1,zabbix ]'
test_type: both
out:
return: SYSINFO_RET_OK
req: "GET /zabbix HTTP/1.1\r\nHost: 127.0.0.1\r\nConnection: close\r\n\r\n"
url: "http://127.0.0.1:80/zabbix "
---
test case: 'Regular 127.0.0.1,/zabbix'
in:
key: 'web.page.get[127.0.0.1,/zabbix ]'
test_type: both
out:
return: SYSINFO_RET_OK
req: "GET /zabbix HTTP/1.1\r\nHost: 127.0.0.1\r\nConnection: close\r\n\r\n"
url: "http://127.0.0.1:80/zabbix "
---
test case: 'Regular 127.0.0.1,zabbix,80'
in:
key: 'web.page.get[127.0.0.1,/zabbix ,80]'
test_type: both
out:
return: SYSINFO_RET_OK
req: "GET /zabbix HTTP/1.1\r\nHost: 127.0.0.1\r\nConnection: close\r\n\r\n"
url: "http://127.0.0.1:80/zabbix "
---
test case: 'Injection 127.0\r\n.0.1'
in:
key: "web.page.get[127.0\r\n.0.1]"
test_type: both
out:
return: SYSINFO_RET_FAIL
error: 'Incorrect hostname expression. Check hostname part after: 127.0.'
---
test case: 'Injection \r\n127.0\r\n.0.1'
in:
key: "web.page.get[\r\n127.0\r\n.0.1]"
test_type: both
out:
return: SYSINFO_RET_FAIL
error: 'Incorrect hostname expression. Check hostname part after: .'
---
test case: 'Injection 127.0.0.1,zabbi\r\n\r\n\r\nx'
in:
key: "web.page.get[127.0.0.1,zabbi\r\n\r\n\r\nx]"
test_type: both
out:
return: SYSINFO_RET_FAIL
error: 'Incorrect path expression. Check path part after: zabbi.'
---
test case: 'Injection 127.0.0.1,\r\n\r\n/zabbi\r\n\r\n\r\nx,80'
in:
key: "web.page.get[127.0.0.1,\r\n\r\n/zabbi\r\n\r\n\r\nx,80]"
test_type: both
out:
return: SYSINFO_RET_FAIL
error: 'Incorrect path expression. Check path part after: .'
---
test case: 'HTTPS URL [https://www.example.com:443/some_path]'
in:
key: 'web.page.get[https://www.example.com:443/some_path]'
test_type: libcurl
out:
return: SYSINFO_RET_OK
url: "https://www.example.com:443/some_path"
---
test case: 'HTTPS URL [https://www.example.com:443/some_path]; legacy'
in:
key: 'web.page.get[https://www.example.com:443/some_path]'
test_type: legacy
out:
return: SYSINFO_RET_FAIL
error: 'Unsupported scheme: https.'
---
test case: 'HTTPS URL, "path" parameter is set [https://www.example.com:443/some_path,some_path]'
in:
key: 'web.page.get[https://www.example.com:443/some_path,some_path]'
test_type: both
out:
return: SYSINFO_RET_FAIL
error: 'Parameters "path" and "port" must be empty if URL is specified in "host".'
---
test case: 'HTTPS URL, "port" parameter is set [https://www.example.com/some_path,,80]'
in:
key: 'web.page.get[https://www.example.com/some_path,,80]'
test_type: both
out:
return: SYSINFO_RET_FAIL
error: 'Parameters "path" and "port" must be empty if URL is specified in "host".'
---
test case: 'Domain name [www.example.com]'
in:
key: 'web.page.get[www.example.com]'
test_type: both
out:
return: SYSINFO_RET_OK
req: "GET / HTTP/1.1\r\nHost: www.example.com\r\nConnection: close\r\n\r\n"
url: "http://www.example.com:80/"
---
test case: 'Domain name, "path" and "port" parameters are set [www.example.com,/some_path,80]'
in:
key: 'web.page.get[www.example.com,/some_path,80]'
test_type: both
out:
return: SYSINFO_RET_OK
req: "GET /some_path HTTP/1.1\r\nHost: www.example.com\r\nConnection: close\r\n\r\n"
url: "http://www.example.com:80/some_path"
---
test case: 'Domain name, "path" parameter is set [www.example.com,some_path]'
in:
key: 'web.page.get[www.example.com,some_path]'
test_type: both
out:
return: SYSINFO_RET_OK
req: "GET /some_path HTTP/1.1\r\nHost: www.example.com\r\nConnection: close\r\n\r\n"
url: "http://www.example.com:80/some_path"
---
test case: 'URL with userinfo [user@example.com]'
in:
key: 'web.page.get[user@example.com]'
test_type: libcurl
out:
return: SYSINFO_RET_OK
url: "http://user@example.com"
---
test case: 'URL with userinfo [user@example.com]; legacy'
in:
key: 'web.page.get[user@example.com]'
test_type: legacy
out:
return: SYSINFO_RET_FAIL
error: 'Unsupported URL format.'
---
test case: 'HTTPS URL with userinfo [https://user@example.com]'
in:
key: 'web.page.get[https://user@example.com]'
test_type: libcurl
out:
return: SYSINFO_RET_OK
url: "https://user@example.com"
---
test case: 'HTTPS URL with userinfo [https://user@example.com]; legacy'
in:
key: 'web.page.get[https://user@example.com]'
test_type: legacy
out:
return: SYSINFO_RET_FAIL
error: 'Unsupported scheme: https.'
---
test case: 'Invalid URL [http:/www.example.com]'
in:
key: 'web.page.get[http:/www.example.com]'
test_type: libcurl
out:
return: SYSINFO_RET_OK
url: "http://http:/www.example.com"
---
test case: 'Invalid URL [http:/www.example.com]; legacy'
in:
key: 'web.page.get[http:/www.example.com]'
test_type: legacy
out:
return: SYSINFO_RET_FAIL
error: 'URL using bad/illegal format.'
---
test case: 'HTTP URL ["http://[ff00::ff00:ff00:ff00:ff00]:80/trunk"]'
in:
key: 'web.page.get["http://[ff00::ff00:ff00:ff00:ff00]:80/trunk"]'
test_type: both
out:
return: SYSINFO_RET_OK
req: "GET /trunk HTTP/1.1\r\nHost: [ff00::ff00:ff00:ff00:ff00]\r\nConnection: close\r\n\r\n"
url: "http://[ff00::ff00:ff00:ff00:ff00]:80/trunk"
---
test case: 'HTTP URL ["http://[::1]:80/trunk"]'
in:
key: 'web.page.get["http://[::1]:80/trunk"]'
test_type: both
out:
return: SYSINFO_RET_OK
req: "GET /trunk HTTP/1.1\r\nHost: [::1]\r\nConnection: close\r\n\r\n"
url: "http://[::1]:80/trunk"
---
test case: 'FTP URL [ftp://www.example.com:443/some_path]'
in:
key: 'web.page.get[ftp://www.example.com:443/some_path]'
test_type: both
out:
return: SYSINFO_RET_FAIL
error: 'Unsupported scheme: ftp.'
---
test case: 'Domain name, "port" parameter is set [www.example.com,,443]'
in:
key: 'web.page.get[www.example.com,,443]'
test_type: both
out:
return: SYSINFO_RET_OK
req: "GET / HTTP/1.1\r\nHost: www.example.com\r\nConnection: close\r\n\r\n"
url: "http://www.example.com:443/"
---
test case: 'HTTPS URL [https://www.example.com:80]'
in:
key: 'web.page.get[https://www.example.com:80]'
test_type: libcurl
out:
return: SYSINFO_RET_OK
url: "https://www.example.com:80"
---
test case: 'HTTPS URL [https://www.example.com:80]; legacy'
in:
key: 'web.page.get[https://www.example.com:80]'
test_type: legacy
out:
return: SYSINFO_RET_FAIL
error: 'Unsupported scheme: https.'
---
test case: 'HTTP URL [http://www.example.com]'
in:
key: 'web.page.get[http://www.example.com]'
test_type: both
out:
return: SYSINFO_RET_OK
req: "GET / HTTP/1.1\r\nHost: www.example.com\r\nConnection: close\r\n\r\n"
url: "http://www.example.com"
---
test case: 'IPv4 host [127.0.0.1]'
in:
key: 'web.page.get[127.0.0.1]'
test_type: both
out:
return: SYSINFO_RET_OK
req: "GET / HTTP/1.1\r\nHost: 127.0.0.1\r\nConnection: close\r\n\r\n"
url: "http://127.0.0.1:80/"
---
test case: 'URL [127.0.0.1:80/]'
in:
key: 'web.page.get[127.0.0.1:80/]'
test_type: both
out:
return: SYSINFO_RET_OK
req: "GET / HTTP/1.1\r\nHost: 127.0.0.1\r\nConnection: close\r\n\r\n"
url: "http://127.0.0.1:80/"
---
test case: 'IPv6 host [ff00::ff00:ff00:ff00:ff00]'
in:
key: 'web.page.get[ff00::ff00:ff00:ff00:ff00]'
test_type: both
out:
return: SYSINFO_RET_OK
req: "GET / HTTP/1.1\r\nHost: [ff00::ff00:ff00:ff00:ff00]\r\nConnection: close\r\n\r\n"
url: "http://[ff00::ff00:ff00:ff00:ff00]:80/"
---
test case: 'IPv6 host [::1]'
in:
key: 'web.page.get[::1]'
test_type: both
out:
return: SYSINFO_RET_OK
req: "GET / HTTP/1.1\r\nHost: [::1]\r\nConnection: close\r\n\r\n"
url: "http://[::1]:80/"
---
test case: 'Invalid IPv6 host [::1:80]'
in:
key: 'web.page.get[::1:80]'
test_type: both
out:
return: SYSINFO_RET_OK
req: "GET / HTTP/1.1\r\nHost: [::1:80]\r\nConnection: close\r\n\r\n"
url: "http://[::1:80]:80/"
---
test case: 'URL ["[::1]:80"]'
in:
key: 'web.page.get["[::1]:80"]'
test_type: both
out:
return: SYSINFO_RET_OK
req: "GET / HTTP/1.1\r\nHost: [::1]\r\nConnection: close\r\n\r\n"
url: "http://[::1]:80"
---
test case: 'URL [127.0.0.1:80]'
in:
key: 'web.page.get[127.0.0.1:80]'
test_type: both
out:
return: SYSINFO_RET_OK
req: "GET / HTTP/1.1\r\nHost: 127.0.0.1\r\nConnection: close\r\n\r\n"
url: "http://127.0.0.1:80"
---
test case: 'HTTPS URL [https://user:pass@www.example.com:443/some_path]'
in:
key: 'web.page.get[https://user:pass@www.example.com:443/some_path]'
test_type: libcurl
out:
return: SYSINFO_RET_OK
url: "https://user:pass@www.example.com:443/some_path"
---
test case: 'HTTPS URL [https://user:pass@www.example.com:443/some_path]; legacy'
in:
key: 'web.page.get[https://user:pass@www.example.com:443/some_path]'
test_type: legacy
out:
return: SYSINFO_RET_FAIL
error: 'Unsupported scheme: https.'
---
test case: 'Hostname [localhost]'
in:
key: 'web.page.get[localhost]'
test_type: both
out:
return: SYSINFO_RET_OK
req: "GET / HTTP/1.1\r\nHost: localhost\r\nConnection: close\r\n\r\n"
url: "http://localhost:80/"
---
test case: 'HTTPS URL [ hTtPS://www.example.com]'
in:
key: 'web.page.get[ hTtPS://www.example.com]'
test_type: libcurl
out:
return: SYSINFO_RET_OK
url: "hTtPS://www.example.com"
---
test case: 'HTTPS URL [ hTtPS://www.example.com]; legacy'
in:
key: 'web.page.get[ hTtPS://www.example.com]'
test_type: legacy
out:
return: SYSINFO_RET_FAIL
error: 'Unsupported scheme: hTtPS.'
---
test case: 'Domain name [пример.рус]'
in:
key: 'web.page.get[пример.рус]'
test_type: both
out:
return: SYSINFO_RET_OK
req: "GET / HTTP/1.1\r\nHost: xn--e1afmkfd.xn--p1acf\r\nConnection: close\r\n\r\n"
url: "http://xn--e1afmkfd.xn--p1acf:80/"
---
test case: 'Domain name, "path" parameter is set [пример.рус,#opp]'
in:
key: 'web.page.get[пример.рус,#opp]'
test_type: both
out:
return: SYSINFO_RET_OK
req: "GET /#opp HTTP/1.1\r\nHost: xn--e1afmkfd.xn--p1acf\r\nConnection: close\r\n\r\n"
url: "http://xn--e1afmkfd.xn--p1acf:80/#opp"
---
test case: 'HTTP URL [http://пример.рус]'
in:
key: 'web.page.get[http://пример.рус]'
test_type: both
out:
return: SYSINFO_RET_OK
req: "GET / HTTP/1.1\r\nHost: xn--e1afmkfd.xn--p1acf\r\nConnection: close\r\n\r\n"
url: "http://xn--e1afmkfd.xn--p1acf"
---
test case: 'HTTP URL [http://пример.рус:80/#opp]'
in:
key: 'web.page.get[http://пример.рус:80/#opp]'
test_type: both
out:
return: SYSINFO_RET_OK
req: "GET / HTTP/1.1\r\nHost: xn--e1afmkfd.xn--p1acf\r\nConnection: close\r\n\r\n"
url: "http://xn--e1afmkfd.xn--p1acf:80/"
---
test case: 'HTTP URL [http://пример.рус:80#opp]'
in:
key: 'web.page.get[http://пример.рус:80#opp]'
test_type: both
out:
return: SYSINFO_RET_OK
req: "GET / HTTP/1.1\r\nHost: xn--e1afmkfd.xn--p1acf\r\nConnection: close\r\n\r\n"
url: "http://xn--e1afmkfd.xn--p1acf:80"
---
test case: 'Invalid HTTP URL [http://www.example.com:/some_path]'
in:
key: 'web.page.get[http://www.example.com:/some_path]'
test_type: libcurl
out:
return: SYSINFO_RET_OK
url: "http://www.example.com:/some_path"
---
test case: 'Invalid HTTP URL [http://www.example.com:/some_path]; legacy'
in:
key: 'web.page.get[http://www.example.com:/some_path]'
test_type: legacy
out:
return: SYSINFO_RET_FAIL
error: 'URL using bad/illegal format.'
---
test case: 'Invalid HTTP URL [http://www.example.com:999999/some_path]'
in:
key: 'web.page.get[http://www.example.com:999999/some_path]'
test_type: libcurl
out:
return: SYSINFO_RET_OK
url: "http://www.example.com:999999/some_path"
---
test case: 'Invalid HTTP URL [http://www.example.com:999999/some_path]; legacy'
in:
key: 'web.page.get[http://www.example.com:999999/some_path]'
test_type: legacy
out:
return: SYSINFO_RET_FAIL
error: 'URL using bad/illegal format.'
---
test case: 'Invalid HTTP URL [http://www.example.com:abc/some_path]'
in:
key: 'web.page.get[http://www.example.com:abc/some_path]'
test_type: libcurl
out:
return: SYSINFO_RET_OK
url: "http://www.example.com:abc/some_path"
---
test case: 'Invalid HTTP URL [http://www.example.com:abc/some_path]; legacy'
in:
key: 'web.page.get[http://www.example.com:abc/some_path]'
test_type: legacy
out:
return: SYSINFO_RET_FAIL
error: 'URL using bad/illegal format.'
---
test case: 'Domain name, "port" parameter is set [www.example.com,,999999]'
in:
key: 'web.page.get[www.example.com,,999999]'
test_type: both
out:
return: SYSINFO_RET_FAIL
error: 'Invalid third parameter.'
---
test case: 'Domain name, "port" parameter is set [www.example.com,,abc]'
in:
key: 'web.page.get[www.example.com,,abc]'
test_type: both
out:
return: SYSINFO_RET_FAIL
error: 'Invalid third parameter.'
---
test case: 'HTTPS URL [https://www.example.com]'
in:
key: 'web.page.get[https://www.example.com]'
test_type: libcurl
out:
return: SYSINFO_RET_OK
url: "https://www.example.com"
---
test case: 'HTTPS URL [https://www.example.com]; legacy'
in:
key: 'web.page.get[https://www.example.com]'
test_type: legacy
out:
return: SYSINFO_RET_FAIL
error: 'Unsupported scheme: https.'
---
test case: 'Invalid URL [www.example.com:/some_path]'
in:
key: 'web.page.get[www.example.com:/some_path]'
test_type: libcurl
out:
return: SYSINFO_RET_OK
url: "http://www.example.com:/some_path"
---
test case: 'Invalid URL [www.example.com:/some_path]; legacy'
in:
key: 'web.page.get[www.example.com:/some_path]'
test_type: legacy
out:
return: SYSINFO_RET_FAIL
error: 'URL using bad/illegal format.'
---
test case: 'HTTP URL [http://www.example.com:80/some_path]'
in:
key: 'web.page.get[http://www.example.com:80/some_path]'
test_type: both
out:
return: SYSINFO_RET_OK
req: "GET /some_path HTTP/1.1\r\nHost: www.example.com\r\nConnection: close\r\n\r\n"
url: "http://www.example.com:80/some_path"
---
test case: 'HTTP URL [ hTtP://www.example.com]'
in:
key: 'web.page.get[ hTtP://www.example.com]'
test_type: both
out:
return: SYSINFO_RET_OK
req: "GET / HTTP/1.1\r\nHost: www.example.com\r\nConnection: close\r\n\r\n"
url: "hTtP://www.example.com"
---
test case: 'Invalid HTTP URL ["http://::1]:80/trunk"]'
in:
key: 'web.page.get["http://::1]:80/trunk"]'
test_type: libcurl
out:
return: SYSINFO_RET_OK
url: "http://::1]:80/trunk"
---
test case: 'Invalid HTTP URL ["http://::1]:80/trunk"]; legacy'
in:
key: 'web.page.get["http://::1]:80/trunk"]'
test_type: legacy
out:
return: SYSINFO_RET_FAIL
error: 'URL using bad/illegal format.'
---
test case: 'URL [www.example.com#some_fragment]'
in:
key: 'web.page.get[www.example.com#some_fragment]'
test_type: both
out:
return: SYSINFO_RET_OK
req: "GET / HTTP/1.1\r\nHost: www.example.com\r\nConnection: close\r\n\r\n"
url: "http://www.example.com"
---
test case: 'URL [www.example.com/some_path#some_fragment]'
in:
key: 'web.page.get[www.example.com/some_path#some_fragment]'
test_type: both
out:
return: SYSINFO_RET_OK
req: "GET /some_path HTTP/1.1\r\nHost: www.example.com\r\nConnection: close\r\n\r\n"
url: "http://www.example.com/some_path"
---
test case: 'URL [www.example.com/#]'
in:
key: 'web.page.get[www.example.com/#]'
test_type: both
out:
return: SYSINFO_RET_OK
req: "GET / HTTP/1.1\r\nHost: www.example.com\r\nConnection: close\r\n\r\n"
url: "http://www.example.com/"
---
test case: 'URL [www.example.com#]'
in:
key: 'web.page.get[www.example.com#]'
test_type: both
out:
return: SYSINFO_RET_OK
req: "GET / HTTP/1.1\r\nHost: www.example.com\r\nConnection: close\r\n\r\n"
url: "http://www.example.com"
---
test case: 'URL [www.example.com/doodle:443#some_:443fragment:443]'
in:
key: 'web.page.get[www.example.com/doodle:443#some_:443fragment:443]'
test_type: both
out:
return: SYSINFO_RET_OK
req: "GET /doodle:443 HTTP/1.1\r\nHost: www.example.com\r\nConnection: close\r\n\r\n"
url: "http://www.example.com/doodle:443"
---
test case: 'URL [http://пример.рус/files/docs/]'
in:
key: 'web.page.get[http://пример.рус/files/docs/]'
test_type: both
out:
return: SYSINFO_RET_OK
req: "GET /files/docs/ HTTP/1.1\r\nHost: xn--e1afmkfd.xn--p1acf\r\nConnection: close\r\n\r\n"
url: "http://xn--e1afmkfd.xn--p1acf/files/docs/"
---
test case: 'Domain, "path" parameter is set [пример.рус,/files/docs/]'
in:
key: 'web.page.get[пример.рус,/files/docs/]'
test_type: both
out:
return: SYSINFO_RET_OK
req: "GET /files/docs/ HTTP/1.1\r\nHost: xn--e1afmkfd.xn--p1acf\r\nConnection: close\r\n\r\n"
url: "http://xn--e1afmkfd.xn--p1acf:80/files/docs/"
---
test case: 'Invalid HTTP URL [http://#fragment]'
in:
key: 'web.page.get[http://#fragment]'
test_type: libcurl
out:
return: SYSINFO_RET_OK
url: "http://"
---
test case: 'Invalid HTTP URL [http://#fragment]; legacy'
in:
key: 'web.page.get[http://#fragment]'
test_type: legacy
out:
return: SYSINFO_RET_FAIL
error: 'Invalid or missing host in URL.'
---
test case: 'URL ["[::1]/server-status"]'
in:
key: 'web.page.get["[::1]/server-status"]'
test_type: both
out:
return: SYSINFO_RET_OK
req: "GET /server-status HTTP/1.1\r\nHost: [::1]\r\nConnection: close\r\n\r\n"
url: "http://[::1]/server-status"
---
test case: 'URL [scheme:path:without:authority]'
in:
key: 'web.page.get[scheme:path:without:authority]'
test_type: both
out:
return: SYSINFO_RET_OK
req: "GET / HTTP/1.1\r\nHost: [scheme:path:without:authority]\r\nConnection: close\r\n\r\n"
url: "http://[scheme:path:without:authority]:80/"
---
test case: 'URL [www.example.com:80#fragmentftp://www.example.com/]'
in:
key: 'web.page.get[www.example.com:80#fragmentftp://www.example.com/]'
test_type: both
out:
return: SYSINFO_RET_OK
req: "GET / HTTP/1.1\r\nHost: www.example.com\r\nConnection: close\r\n\r\n"
url: "http://www.example.com:80"
---
test case: 'URL [www.example.com#ftp://www.example.com/]'
in:
key: 'web.page.get[www.example.com#ftp://www.example.com/]'
test_type: both
out:
return: SYSINFO_RET_OK
req: "GET / HTTP/1.1\r\nHost: www.example.com\r\nConnection: close\r\n\r\n"
url: "http://www.example.com"
---
test case: 'URL [www.example.com:80?fragmentftp://www.example.com/]'
in:
key: 'web.page.get[www.example.com:80?fragmentftp://www.example.com/]'
test_type: both
out:
return: SYSINFO_RET_OK
req: "GET /?fragmentftp://www.example.com/ HTTP/1.1\r\nHost: www.example.com\r\nConnection: close\r\n\r\n"
url: "http://www.example.com:80?fragmentftp://www.example.com/"
---
test case: 'URL [www.example.com?ftp://www.example.com/]'
in:
key: 'web.page.get[www.example.com?ftp://www.example.com/]'
test_type: both
out:
return: SYSINFO_RET_OK
req: "GET /?ftp://www.example.com/ HTTP/1.1\r\nHost: www.example.com\r\nConnection: close\r\n\r\n"
url: "http://www.example.com?ftp://www.example.com/"
---
test case: 'HTTP URL [ http://localhost?a=b]'
in:
key: 'web.page.get[ http://localhost?a=b]'
test_type: both
out:
return: SYSINFO_RET_OK
req: "GET /?a=b HTTP/1.1\r\nHost: localhost\r\nConnection: close\r\n\r\n"
url: "http://localhost?a=b"
---
test case: 'Hostname, "path" parameter is set [ localhost,?a=b]'
in:
key: 'web.page.get[ localhost,?a=b]'
test_type: both
out:
return: SYSINFO_RET_OK
req: "GET /?a=b HTTP/1.1\r\nHost: localhost\r\nConnection: close\r\n\r\n"
url: "http://localhost:80/?a=b"
---
test case: 'Invalid URL [@user:pass/index.html]'
in:
key: 'web.page.get[@user:pass/index.html]'
test_type: libcurl
out:
return: SYSINFO_RET_OK
url: 'http://@user:pass/index.html'
---
test case: 'Invalid URL [@user:pass/index.html]; legacy'
in:
key: 'web.page.get[@user:pass/index.html]'
test_type: legacy
out:
return: SYSINFO_RET_FAIL
error: 'Unsupported URL format.'
---
test case: 'Invalid HTTP URL [http://user:pass@]'
in:
key: 'web.page.get[http://user:pass@]'
test_type: libcurl
out:
return: SYSINFO_RET_OK
url: 'http://user:pass@'
---
test case: 'Invalid HTTP URL [http://user:pass@]; legacy'
in:
key: 'web.page.get[http://user:pass@]'
test_type: legacy
out:
return: SYSINFO_RET_FAIL
error: 'Unsupported URL format.'
---
test case: 'Invalid HTTP URL [http://user:pass@/index.html]'
in:
key: 'web.page.get[http://user:pass@/index.html]'
test_type: libcurl
out:
return: SYSINFO_RET_OK
url: 'http://user:pass@/index.html'
---
test case: 'Invalid HTTP URL [http://user:pass@/index.html]; legacy'
in:
key: 'web.page.get[http://user:pass@/index.html]'
test_type: legacy
out:
return: SYSINFO_RET_FAIL
error: 'Unsupported URL format.'
---
test case: 'Invalid URL [www.example.com://]'
in:
key: 'web.page.get[www.example.com://]'
test_type: both
out:
return: SYSINFO_RET_FAIL
error: 'Unsupported scheme: www.example.com.'
---
test case: 'Invalid URL [://www.example.com]'
in:
key: 'web.page.get[://www.example.com]'
test_type: both
out:
return: SYSINFO_RET_FAIL
error: 'Unsupported scheme: .'
---
test case: 'Invalid URL [www.example.com:]'
in:
key: 'web.page.get[www.example.com:]'
test_type: libcurl
out:
return: SYSINFO_RET_OK
url: "http://www.example.com:"
---
test case: 'Invalid URL [www.example.com:]; legacy'
in:
key: 'web.page.get[www.example.com:]'
test_type: legacy
out:
return: SYSINFO_RET_FAIL
error: 'URL using bad/illegal format.'
---
test case: 'HTTP URL [http://www.example.com?]'
in:
key: 'web.page.get[http://www.example.com?]'
test_type: both
out:
return: SYSINFO_RET_OK
req: "GET /? HTTP/1.1\r\nHost: www.example.com\r\nConnection: close\r\n\r\n"
url: "http://www.example.com?"
---
test case: 'URL [www.example.com/user@info]'
in:
key: 'web.page.get[www.example.com/user@info]'
test_type: both
out:
return: SYSINFO_RET_OK
req: "GET /user@info HTTP/1.1\r\nHost: www.example.com\r\nConnection: close\r\n\r\n"
url: "http://www.example.com/user@info"
---
test case: 'URL [www.example.com?user@info]'
in:
key: 'web.page.get[www.example.com?user@info]'
test_type: both
out:
return: SYSINFO_RET_OK
req: "GET /?user@info HTTP/1.1\r\nHost: www.example.com\r\nConnection: close\r\n\r\n"
url: "http://www.example.com?user@info"
---
test case: 'Invalid URL [://]'
in:
key: 'web.page.get[://]'
test_type: both
out:
return: SYSINFO_RET_FAIL
error: 'Unsupported scheme: .'
---
test case: 'Invalid HTTP URL [http://]'
in:
key: 'web.page.get[http://]'
test_type: libcurl
out:
return: SYSINFO_RET_OK
url: "http://"
---
test case: 'Invalid HTTP URL [http://]; legacy'
in:
key: 'web.page.get[http://]'
test_type: legacy
out:
return: SYSINFO_RET_FAIL
error: 'Invalid or missing host in URL.'
---
test case: 'Invalid URL HTTP [http:// ]'
in:
key: 'web.page.get[http:// ]'
test_type: both
out:
return: SYSINFO_RET_OK
req: "GET / HTTP/1.1\r\nHost: \r\nConnection: close\r\n\r\n"
url: "http:// "
---
test case: 'Hostname [http]'
in:
key: 'web.page.get[http]'
test_type: both
out:
return: SYSINFO_RET_OK
req: "GET / HTTP/1.1\r\nHost: http\r\nConnection: close\r\n\r\n"
url: "http://http:80/"
---
test case: 'Invalid URL ["[]"]'
in:
key: 'web.page.get["[]"]'
test_type: libcurl
out:
return: SYSINFO_RET_OK
url: "http://[]"
---
test case: 'Invalid URL ["[]"]; legacy'
in:
key: 'web.page.get["[]"]'
test_type: legacy
out:
return: SYSINFO_RET_FAIL
error: 'Invalid or missing host in URL.'
---
test case: 'Invalid URL ["["]'
in:
key: 'web.page.get["["]'
test_type: libcurl
out:
return: SYSINFO_RET_OK
url: "http://["
---
test case: 'Invalid URL ["["]; legacy'
in:
key: 'web.page.get["["]'
test_type: legacy
out:
return: SYSINFO_RET_FAIL
error: 'Invalid or missing host in URL.'
---
test case: 'Invalid URL ["]"]'
in:
key: 'web.page.get["]"]'
test_type: both
out:
return: SYSINFO_RET_OK
req: "GET / HTTP/1.1\r\nHost: ]\r\nConnection: close\r\n\r\n"
url: "http://]"
---
test case: 'Invalid URL [/]'
in:
key: 'web.page.get[/]'
test_type: libcurl
out:
return: SYSINFO_RET_OK
url: "http:///"
---
test case: 'Invalid URL [/]; legacy'
in:
key: 'web.page.get[/]'
test_type: legacy
out:
return: SYSINFO_RET_FAIL
error: 'Invalid or missing host in URL.'
---
test case: 'Invalid URL [:]'
in:
key: 'web.page.get[:]'
test_type: libcurl
out:
return: SYSINFO_RET_OK
url: "http://:"
---
test case: 'Invalid URL [:]; legacy'
in:
key: 'web.page.get[:]'
test_type: legacy
out:
return: SYSINFO_RET_FAIL
error: 'URL using bad/illegal format.'
---
test case: 'Invalid URL [@]'
in:
key: 'web.page.get[@]'
test_type: libcurl
out:
return: SYSINFO_RET_OK
url: "http://@"
---
test case: 'Invalid URL [@]; legacy'
in:
key: 'web.page.get[@]'
test_type: legacy
out:
return: SYSINFO_RET_FAIL
error: 'Unsupported URL format.'
---
test case: 'Invalid URL [#]'
in:
key: 'web.page.get[#]'
test_type: libcurl
out:
return: SYSINFO_RET_OK
url: "http://"
---
test case: 'Invalid URL [#]; legacy'
in:
key: 'web.page.get[#]'
test_type: legacy
out:
return: SYSINFO_RET_FAIL
error: 'Invalid or missing host in URL.'
---
test case: 'Invalid URL [?]'
in:
key: 'web.page.get[?]'
test_type: libcurl
out:
return: SYSINFO_RET_OK
url: "http://?"
---
test case: 'Invalid URL [?]; legacy'
in:
key: 'web.page.get[?]'
test_type: legacy
out:
return: SYSINFO_RET_FAIL
error: 'Invalid or missing host in URL.'
---
test case: 'Hostname [a]'
in:
key: 'web.page.get[a]'
test_type: both
out:
return: SYSINFO_RET_OK
req: "GET / HTTP/1.1\r\nHost: a\r\nConnection: close\r\n\r\n"
url: "http://a:80/"
---
test case: 'Invalid URL [:80]'
in:
key: 'web.page.get[:80]'
test_type: libcurl
out:
return: SYSINFO_RET_OK
url: "http://:80"
---
test case: 'Invalid URL [:80]; legacy'
in:
key: 'web.page.get[:80]'
test_type: legacy
out:
return: SYSINFO_RET_FAIL
error: 'Invalid or missing host in URL.'
---
test case: 'Invalid URL [:80/?x=1]'
in:
key: 'web.page.get[:80/?x=1]'
test_type: libcurl
out:
return: SYSINFO_RET_OK
url: "http://:80/?x=1"
---
test case: 'Invalid URL [:80/?x=1]; legacy'
in:
key: 'web.page.get[:80/?x=1]'
test_type: legacy
out:
return: SYSINFO_RET_FAIL
error: 'Invalid or missing host in URL.'