2004-07-16 02:26:21 -04:00
|
|
|
IN: scratchpad
|
2004-08-28 22:25:59 -04:00
|
|
|
USE: file-responder
|
2004-07-16 02:26:21 -04:00
|
|
|
USE: httpd
|
|
|
|
USE: httpd-responder
|
2004-08-10 21:32:10 -04:00
|
|
|
USE: logging
|
|
|
|
USE: namespaces
|
2004-07-16 02:26:21 -04:00
|
|
|
USE: stdio
|
|
|
|
USE: test
|
|
|
|
USE: url-encoding
|
|
|
|
|
2004-08-10 21:32:10 -04:00
|
|
|
[ "HTTP/1.0 404\nContent-Type: text/html\n" ]
|
|
|
|
[ "404" "text/html" response ] unit-test
|
2004-07-16 02:26:21 -04:00
|
|
|
|
2004-08-10 21:32:10 -04:00
|
|
|
[ 5430 ]
|
|
|
|
[ f "Content-Length: 5430" header-line content-length ] unit-test
|
|
|
|
|
|
|
|
[ "hello world" ] [ "hello+world" url-decode ] unit-test
|
|
|
|
[ "hello world" ] [ "hello%20world" url-decode ] unit-test
|
|
|
|
[ " ! " ] [ "%20%21%20" url-decode ] unit-test
|
|
|
|
[ "hello world" ] [ "hello world%" url-decode ] unit-test
|
|
|
|
[ "hello world" ] [ "hello world%x" url-decode ] unit-test
|
|
|
|
[ "hello%20world" ] [ "hello world" url-encode ] unit-test
|
|
|
|
[ "%20%21%20" ] [ " ! " url-encode ] unit-test
|
2004-07-16 02:26:21 -04:00
|
|
|
|
|
|
|
[ ] [ "404 not found" ] [ httpd-error ] test-word
|
|
|
|
|
2004-08-10 21:32:10 -04:00
|
|
|
[ "arg" ] [
|
|
|
|
[
|
|
|
|
"arg" "default-argument" set
|
|
|
|
"" responder-argument
|
|
|
|
] with-scope
|
|
|
|
] unit-test
|
|
|
|
|
|
|
|
[ "inspect/global" ] [ "/inspect/global" trim-/ ] unit-test
|
|
|
|
|
|
|
|
[ ] [
|
|
|
|
[
|
|
|
|
"unit/test" log-responder
|
|
|
|
] with-logging
|
|
|
|
] unit-test
|
|
|
|
|
2004-08-10 22:11:48 -04:00
|
|
|
[ "index.html" ]
|
|
|
|
[ "http://www.jedit.org/index.html" url>path ] unit-test
|
|
|
|
|
|
|
|
[ "foo/bar" ]
|
|
|
|
[ "http://www.jedit.org/foo/bar" url>path ] unit-test
|
|
|
|
|
|
|
|
[ "" ]
|
|
|
|
[ "http://www.jedit.org/" url>path ] unit-test
|
|
|
|
|
|
|
|
[ "" ]
|
|
|
|
[ "http://www.jedit.org" url>path ] unit-test
|
|
|
|
|
|
|
|
[ "foobar" ]
|
|
|
|
[ "foobar" secure-path ] unit-test
|
|
|
|
|
|
|
|
[ f ]
|
|
|
|
[ "foobar/../baz" secure-path ] unit-test
|
|
|
|
|
|
|
|
[ ] [ "GET ../index.html" parse-request ] unit-test
|
|
|
|
[ ] [ "POO" parse-request ] unit-test
|
2004-08-19 19:21:40 -04:00
|
|
|
|
2004-08-29 23:30:54 -04:00
|
|
|
[ [ [ "Foo" | "Bar" ] ] ] [ "Foo=Bar" query>alist ] unit-test
|
|
|
|
|
2004-08-19 19:21:40 -04:00
|
|
|
[ [ [ "Foo" | "Bar" ] [ "Baz" | "Quux" ] ] ]
|
2004-08-29 23:30:54 -04:00
|
|
|
[ "Foo=Bar&Baz=Quux" query>alist ] unit-test
|
|
|
|
|
|
|
|
[ [ [ "Baz" | " " ] ] ]
|
|
|
|
[ "Baz=%20" query>alist ] unit-test
|
|
|
|
|
|
|
|
[ [ [ "Foo" ] ] ] [ "Foo" query>alist ] unit-test
|