1192 lines · 22.3 KB · Text
RawDownload
# start shttpd for testing emu -c0repo=src/shttpdbind '#U*/home' /usr; bind -b '#s' /chan; ndb/cs; ndb/dns -r; cd; home=`{pwd}; cd $home/$repo/appl/cmd/ip; sblpath=(/dis .)bind -a $home/$repo $home/$repo/doc/testroot/localhost:8000bind -a $home/$repo/man $home/$repo/doc/testroot/_default:8000./shttpd -n $home/$repo/doc/ndb-testshttpd $home/$repo/doc/testroot  emu -c0repo=src/scgidbind '#U*/home' /usr; ndb/cs; cd; home=`{pwd}; cd $home/$repo/appl/cmd; sblpath=(/dis .)./scgid ../../doc/scgid.conf	# has handler on net!localhost!4006 cmd='telnet localhost 8000'cmd2='telnet localhost 8001' # plain file, http/1.0 and http/1.1 $cmdGET /README HTTP/1.0Host: localhost:8000Connection: close $cmdGET /README HTTP/1.1Host: localhost:8000Connection: close  # dir listing # succesful, http/1.1$cmdGET /appl/ HTTP/1.1Host: localhost:8000Connection: close # with missing trailing slash# * errror 404$cmdGET /appl HTTP/1.1Host: localhost:8000Connection: close # http/1.0$cmdGET /appl/ HTTP/1.0Host: localhost:8000Connection: close  # index file serving # index.txt$cmdGET /dir0/ HTTP/1.1Host: localhost:8000Connection: close # index.html (not index.txt due to config order)$cmdGET /dir1/ HTTP/1.1Host: localhost:8000Connection: close # no index file present# * serves directory listing$cmdGET /dir2/ HTTP/1.1Host: localhost:8000Connection: close  # redirections # absolute redir$cmdGET /redir1 HTTP/1.1Host: localhost:8000Connection: close # relative redir$cmdGET /redir2 HTTP/1.1Host: localhost:8000Connection: close # redir configured with bad groups# * internal server error$cmdGET /redir4 HTTP/1.1Host: localhost:8000Connection: close # redir with two escaped $'s in destination$cmdGET /redir5 HTTP/1.1Host: localhost:8000Connection: close   # mime type detection#	built-in#	user#	user overrides # no extension -> text/plain$cmdGET /README HTTP/1.1Host: localhost:8000Connection: close # unknown extension -> application/octet-stream$cmd | sed '/^$/q'GET /appl/cmd/ip/shttpd.sbl HTTP/1.1Host: localhost:8000Connection: close # known extension$cmd | sed '/^$/q'GET /appl/cmd/ip/shttpd.b HTTP/1.1Host: localhost:8000Connection: close # user-specified: .dis -> application/x-dis$cmd | sed '/^$/q'GET /appl/cmd/ip/shttpd.dis HTTP/1.1Host: localhost:8000Connection: close # user overriding built-in: .jpg -> testing/jpg$cmd | sed '/^$/q'GET /testing.jpg HTTP/1.1Host: localhost:8000Connection: close   # authorization#	where required#	where not allowed#	with empty user/pass # empty credentials where none are allowed$cmdGET /README HTTP/1.1Host: localhost:8000Connection: closeAuthorization: Basic Og== # non-empty credentials where none are allowed (for sanity)# * error unauthorized$cmdGET /README HTTP/1.1Host: localhost:8000Connection: closeAuthorization: Basic dGVzdHVzZXI6dGVzdHBhc3M= # empty credentials where required# * error unauthorized$cmdGET /auth0 HTTP/1.1Host: localhost:8000Connection: closeAuthorization: Basic Og== # incorrect credentials where required# * error unauthorized$cmdGET /auth0 HTTP/1.1Host: localhost:8000Connection: closeAuthorization: Basic YmFkOmJhZA== # missing credentials where required# * error unauthorized$cmdGET /auth0 HTTP/1.1Host: localhost:8000Connection: close # malformed credentials where required# * error unauthorized$cmdGET /auth0 HTTP/1.1Host: localhost:8000Connection: closeAuthorization: Digest test test # correct credentials where required$cmdGET /auth0 HTTP/1.1Host: localhost:8000Connection: closeAuthorization: Basic dGVzdHVzZXI6dGVzdHBhc3M= # correct credentials on http/1.0$cmdGET /auth0 HTTP/1.0Host: localhost:8000Connection: closeAuthorization: Basic dGVzdHVzZXI6dGVzdHBhc3M=   # caching responses # for plain file$cmd | sed '/^$/q'GET /README HTTP/1.1Host: localhost:8000Connection: close # for dir listing$cmdGET /dir2/ HTTP/1.1Host: localhost:8000Connection: close  # range requests#	invalid ranges#	valid#	plain files, directory # first three bytes$cmdGET /README HTTP/1.1Host: localhost:8000Range: bytes = 0-2Connection: close # valid, random spaces$cmdGET /README HTTP/1.1Host: localhost:8000Range: bytes = 0 -2  Connection: close # valid, random spaces$cmdGET /README HTTP/1.1Host: localhost:8000Range: bytes = 0- 2Connection: close # valid, random whitespace$cmdGET /README HTTP/1.1Host: localhost:8000Range: bytes = 0	          - 2Connection: close # multipart/byteranges, with many different whitespace and different forms$cmdGET /README HTTP/1.1Host: localhost:8000Range: bytes = -3, 1-, 0 - 2, 3-4, 5- 9, 10 -11100000000000000Connection: close # multipart/byteranges, with empty lists$cmdGET /README HTTP/1.1Host: localhost:8000Range: bytes = 0-2,,,4-5Connection: close # bad range value, ignored$cmdGET /README HTTP/1.1Host: localhost:8000Range: bytes = testConnection: close # bad range value, ignored$cmdGET /README HTTP/1.1Host: localhost:8000Range: bytes = 10Connection: close # ignored for http/1.0, returns full object$cmdGET /README HTTP/1.0Host: localhost:8000Range: bytes = 0-2Connection: close   # headers#	date#	last-modified#	etag (plain files, directory listings)#	server # do twice, check that last-modified,etag,server are same;  date is different$cmd | sed '/^$/q'GET /README HTTP/1.0Host: localhost:8000Connection: close   # conditional responses#	if-modified-since#	if-unmodified-since#	if-match#	if-none-match#	if-range#	http/1.0 only does if-unmodified-since, nothing else # if modified long in past, returns new object$cmdGET /README HTTP/1.1Host: localhost:8000Connection: closeif-modified-since: Thu, 1  Jan 1970 01:00:01 GMT # if modified far in future# * error 304 precondition failed$cmdGET /README HTTP/1.1Host: localhost:8000Connection: closeif-modified-since: Mon, 18 Jan 2020 10:01:52 GMT # http/1.0 head must ignore the if-modified-since...$cmd HEAD /README HTTP/1.0Host: localhost:8000if-modified-since: Mon, 18 Jan 2020 10:01:52 GMT # if unmodified since long past# * error 304 precondition failed$cmdGET /README HTTP/1.1Host: localhost:8000Connection: closeif-unmodified-since: Thu, 1  Jan 1970 01:00:01 GMT # if unmodified since far future, will return object$cmdGET /README HTTP/1.1Host: localhost:8000Connection: closeif-unmodified-since: Mon, 18 Jan 2020 10:01:52 GMT # if-match *, if it exists.  returns object$cmdGET /README HTTP/1.1Host: localhost:8000Connection: closeif-match: * # NOTE: etag for README is "9207a52c44a572f6f8f36947216d395c6d05984a", replace by current for testing# if-match correct-tag, returns object$cmdGET /README HTTP/1.1Host: localhost:8000Connection: closeif-match: "9207a52c44a572f6f8f36947216d395c6d05984a" # incorrect tag, 412 precondition failed$cmdGET /README HTTP/1.1Host: localhost:8000Connection: closeif-match: "flierp" # correct tag, but as weak# * error 412 precondition failed$cmdGET /README HTTP/1.1Host: localhost:8000Connection: closeif-match: W/"9207a52c44a572f6f8f36947216d395c6d05984a" # bad syntax for if-match# * error 412 precondition failed$cmdGET /README HTTP/1.1Host: localhost:8000Connection: closeif-match: bad syntax # if-none-match *, if no such file# * error 304 not modified$cmdGET /README HTTP/1.1Host: localhost:8000Connection: closeif-none-match: * # if-none-match correct tag# * error 304 not modified$cmdGET /README HTTP/1.1Host: localhost:8000Connection: closeif-none-match: "9207a52c44a572f6f8f36947216d395c6d05984a" # if-none-match on non-existent file# * error 404 object not found$cmdGET /nosuchfile HTTP/1.1Host: localhost:8000Connection: closeif-none-match: "9207a52c44a572f6f8f36947216d395c6d05984a" # if-none-match, bogus tag, returns file$cmdGET /README HTTP/1.1Host: localhost:8000Connection: closeif-none-match: "bogustag" # if-none-match, bad syntax, returns file$cmdGET /README HTTP/1.1Host: localhost:8000Connection: closeif-none-match: bad syntax # if-range with matching etag, returns partial response$cmdGET /README HTTP/1.1Host: localhost:8000Range: bytes = 0-1Connection: closeIf-Range: "9207a52c44a572f6f8f36947216d395c6d05984a" # if-range with bad syntax for range, returns full response$cmdGET /README HTTP/1.1Host: localhost:8000Range: bytes = bad syntaxConnection: closeIf-Range: "9207a52c44a572f6f8f36947216d395c6d05984a" # if-range with non-matching etag, returns full body$cmdGET /README HTTP/1.1Host: localhost:8000Range: bytes = 0-2Connection: closeIf-Range: "flierp" # if-range with time in past, returns full body$cmdGET /README HTTP/1.1Host: localhost:8000Range: bytes = 0-2Connection: closeif-range: Thu, 1  Jan 1970 01:00:01 GMT # if-range with time in future, returns 206 partial content$cmdGET /README HTTP/1.1Host: localhost:8000Range: bytes = 0-2Connection: closeif-range: Mon, 18 Jan 2020 10:01:52 GMT # now for some http/1.0 conditional requests # if modified since far in future, only conditional http/1.0 supports# * error 304$cmdGET /README HTTP/1.0Host: localhost:8000Connection: closeif-modified-since: Mon, 18 Jan 2020 10:01:52 GMT # if unmodified since long past, 304 for http/1.1, http/1.0 ignores it$cmdGET /README HTTP/1.0Host: localhost:8000Connection: closeif-unmodified-since: Thu, 1  Jan 1970 01:00:01 GMT # if-match, incorrect tag, 412 precondition failed for http/1.1, http/1.0 ignores it$cmdGET /README HTTP/1.0Host: localhost:8000Connection: closeif-match: "flierp" # if-none-match *, if no such file.  304 for http/1.1, ignored for http/1.0$cmdGET /README HTTP/1.0Host: localhost:8000Connection: closeif-none-match: * # if-range with matching etag, returns partial response for http/1.1, ignored for http/1.0$cmd

Lines 1–500 of 1192.