--------------------------------------------- Sample output of HTTP Server Test Plan script --------------------------------------------- -Ian! D. Allen - idallen@idallen.ca This is typical output from running the sample test_plan.sh script to test an HTTP server. The sample script is in notes file "testplanscript3.txt". This server being tested still has all its DEBUG messages turned on, which makes debugging and reading the tests easier. Run the test script with input from /dev/null to avoid prompts between tests. Remember to capture stderr as well as stdout in the same output pipe/file. Run the output through "cat -v" to make extra CR characters visible: $ ./test_plan.sh &1 | cat -v >test_out.txt (As an alternate means to collect test output, the output below is an interactive "script" session, post-processed through "col -b" to remove redundant CR characters. You can do it either way.) Script started file is typescript $ ./test_plan.sh 1 Using: port 55555 wwwhome /tmp 2 PigLatinHTTP accepting connections on port 55555 ==> TEST 1. HEAD a file with a non-text name: idallen-16993.bin ==> Press RETURN to execute test 1 ... ============================================================== Test 1: HEAD a file with a non-text name: idallen-16993.bin ============================================================== 3 Sun Nov 05 19:32:14 EST 2006 [127.0.0.1:48568] HEAD /idallen-16993.bin HTTP/1.0 4 DEBUG method is 'HEAD' 5 DEBUG uri is '/idallen-16993.bin' 6 DEBUG version is 'HTTP/1.0' 7 Sun Nov 05 19:32:14 EST 2006 [127.0.0.1:48568] 200 OK RESPONSE: HTTP/1.0 200 OK^M RESPONSE: Server: IXWT PigLatinHTTP 1.0^M RESPONSE: Content-Type: application/octet-stream^M RESPONSE: Last-Modified: Fri Jan 01 00:00:00 EST 1999^M RESPONSE: Date: Sun Nov 05 19:32:14 EST 2006^M RESPONSE: Content-Length: 119^M RESPONSE: ^M ==> TEST 2. GET a file with a non-text name: idallen-16993.bin ==> Press RETURN to execute test 2 ... ============================================================== Test 2: GET a file with a non-text name: idallen-16993.bin ============================================================== 8 Sun Nov 05 19:32:17 EST 2006 [127.0.0.1:48569] GET /idallen-16993.bin HTTP/1.0 9 DEBUG method is 'GET' 10 DEBUG uri is '/idallen-16993.bin' 11 DEBUG version is 'HTTP/1.0' 12 DEBUG sendFile plain text: false 13 DEBUG> Now is the time for all good men to come to the aid of the party. 14 DEBUG> The quick brown fox jumped over the lazy dog's back. 15 Sun Nov 05 19:32:17 EST 2006 [127.0.0.1:48569] 200 OK RESPONSE: HTTP/1.0 200 OK^M RESPONSE: Server: IXWT PigLatinHTTP 1.0^M RESPONSE: Content-Type: application/octet-stream^M RESPONSE: Last-Modified: Fri Jan 01 00:00:00 EST 1999^M RESPONSE: Date: Sun Nov 05 19:32:17 EST 2006^M RESPONSE: Content-Length: 119^M RESPONSE: ^M RESPONSE: Now is the time for all good men to come to the aid of the party. RESPONSE: The quick brown fox jumped over the lazy dog's back. ==> TEST 3. HEAD a file with a text name: idallen-16993.txt ==> Press RETURN to execute test 3 ... ============================================================== Test 3: HEAD a file with a text name: idallen-16993.txt ============================================================== 16 Sun Nov 05 19:32:19 EST 2006 [127.0.0.1:48570] HEAD /idallen-16993.txt HTTP/1.0 17 DEBUG method is 'HEAD' 18 DEBUG uri is '/idallen-16993.txt' 19 DEBUG version is 'HTTP/1.0' 20 Sun Nov 05 19:32:19 EST 2006 [127.0.0.1:48570] 200 OK RESPONSE: HTTP/1.0 200 OK^M RESPONSE: Server: IXWT PigLatinHTTP 1.0^M RESPONSE: Content-Type: text/plain^M RESPONSE: Last-Modified: Fri Jan 01 00:00:00 EST 1999^M RESPONSE: Date: Sun Nov 05 19:32:19 EST 2006^M RESPONSE: Content-Length: 119^M RESPONSE: ^M ==> TEST 4. GET a file with a text name: idallen-16993.txt ==> Press RETURN to execute test 4 ... ============================================================== Test 4: GET a file with a text name: idallen-16993.txt ============================================================== 21 Sun Nov 05 19:32:21 EST 2006 [127.0.0.1:48571] GET /idallen-16993.txt HTTP/1.0 22 DEBUG method is 'GET' 23 DEBUG uri is '/idallen-16993.txt' 24 DEBUG version is 'HTTP/1.0' 25 DEBUG sendFile plain text: true 26 DEBUG> ownay isyay ethay imetay orfay allyay oodgay enmay otay omecay otay ethay aidyay ofyay ethay arty.pay 27 DEBUG> ethay uickqay ownbray oxfay umpedjay overyay ethay azylay og'sday ack.bay 28 Sun Nov 05 19:32:21 EST 2006 [127.0.0.1:48571] 200 OK RESPONSE: HTTP/1.0 200 OK^M RESPONSE: Server: IXWT PigLatinHTTP 1.0^M RESPONSE: Content-Type: text/plain^M RESPONSE: Last-Modified: Fri Jan 01 00:00:00 EST 1999^M RESPONSE: Date: Sun Nov 05 19:32:21 EST 2006^M RESPONSE: Content-Length: 119^M RESPONSE: ^M RESPONSE: ownay isyay ethay imetay orfay allyay oodgay enmay otay omecay otay ethay aidyay ofyay ethay arty.pay RESPONSE: ethay uickqay ownbray oxfay umpedjay overyay ethay azylay og'sday ack.bay ==> TEST 5. GET with extra spaces (should work) ==> Press RETURN to execute test 5 ... ============================================================== Test 5: GET with extra spaces (should work) ============================================================== 29 Sun Nov 05 19:32:23 EST 2006 [127.0.0.1:48572] GET /idallen-16993.txt HTTP/1.0 30 DEBUG method is 'GET' 31 DEBUG uri is '/idallen-16993.txt' 32 DEBUG version is 'HTTP/1.0' 33 DEBUG sendFile plain text: true 34 DEBUG> ownay isyay ethay imetay orfay allyay oodgay enmay otay omecay otay ethay aidyay ofyay ethay arty.pay 35 DEBUG> ethay uickqay ownbray oxfay umpedjay overyay ethay azylay og'sday ack.bay 36 Sun Nov 05 19:32:23 EST 2006 [127.0.0.1:48572] 200 OK RESPONSE: HTTP/1.0 200 OK^M RESPONSE: Server: IXWT PigLatinHTTP 1.0^M RESPONSE: Content-Type: text/plain^M RESPONSE: Last-Modified: Fri Jan 01 00:00:00 EST 1999^M RESPONSE: Date: Sun Nov 05 19:32:23 EST 2006^M RESPONSE: Content-Length: 119^M RESPONSE: ^M RESPONSE: ownay isyay ethay imetay orfay allyay oodgay enmay otay omecay otay ethay aidyay ofyay ethay arty.pay RESPONSE: ethay uickqay ownbray oxfay umpedjay overyay ethay azylay og'sday ack.bay ==> TEST 6. GET invalid syntax: missing leading blank (should fail as invalid) ==> Press RETURN to execute test 6 ... ============================================================== Test 6: GET invalid syntax: missing leading blank (should fail as invalid) ============================================================== 37 Sun Nov 05 19:32:25 EST 2006 [127.0.0.1:48573] GET//idallen-16993.txt HTTP/1.0 38 Sun Nov 05 19:32:25 EST 2006 [127.0.0.1:48573] 400 Expecting exactly three request fields: 2 RESPONSE: HTTP/1.0 400 Expecting exactly three request fields: 2^M RESPONSE: ^M RESPONSE: ^M RESPONSE: 400 Expecting exactly three request fields: 2^M RESPONSE: ^M RESPONSE:

Expecting exactly three request fields: 2

^M RESPONSE: Your browser sent a request that this server could not understand.

^M RESPONSE:


IXWT PigLatinHTTP 1.0 at localhost.home.idallen.ca Port 55555
^M RESPONSE: ^M ==> TEST 7. GET invalid syntax: missing trailing blank (should fail as invalid) ==> Press RETURN to execute test 7 ... ============================================================== Test 7: GET invalid syntax: missing trailing blank (should fail as invalid) ============================================================== 39 Sun Nov 05 19:32:28 EST 2006 [127.0.0.1:48574] GET /idallen-16993.txtHTTP/1.0 40 Sun Nov 05 19:32:28 EST 2006 [127.0.0.1:48574] 400 Expecting exactly three request fields: 2 RESPONSE: HTTP/1.0 400 Expecting exactly three request fields: 2^M RESPONSE: ^M RESPONSE: ^M RESPONSE: 400 Expecting exactly three request fields: 2^M RESPONSE: ^M RESPONSE:

Expecting exactly three request fields: 2

^M RESPONSE: Your browser sent a request that this server could not understand.

^M RESPONSE:


IXWT PigLatinHTTP 1.0 at localhost.home.idallen.ca Port 55555
^M RESPONSE: ^M ==> TEST 8. GET in wrong case (should fail as invalid) ==> Press RETURN to execute test 8 ... ============================================================== Test 8: GET in wrong case (should fail as invalid) ============================================================== 41 Sun Nov 05 19:32:31 EST 2006 [127.0.0.1:48575] get /idallen-16993.bin HTTP/1.0 42 DEBUG method is 'get' 43 DEBUG uri is '/idallen-16993.bin' 44 DEBUG version is 'HTTP/1.0' 45 Sun Nov 05 19:32:31 EST 2006 [127.0.0.1:48575] 405 Unknown request method: get RESPONSE: HTTP/1.0 405 Unknown request method: get^M RESPONSE: ^M RESPONSE: ^M RESPONSE: 405 Unknown request method: get^M RESPONSE: ^M RESPONSE:

Unknown request method: get

^M RESPONSE: Your browser sent a request that this server could not understand.

^M RESPONSE:


IXWT PigLatinHTTP 1.0 at localhost.home.idallen.ca Port 55555
^M RESPONSE: ^M ==> TEST 9. HTTP in wrong case (should fail as invalid) ==> Press RETURN to execute test 9 ... ============================================================== Test 9: HTTP in wrong case (should fail as invalid) ============================================================== 46 Sun Nov 05 19:32:34 EST 2006 [127.0.0.1:48576] GET /idallen-16993.bin http/1.0 47 DEBUG method is 'GET' 48 DEBUG uri is '/idallen-16993.bin' 49 DEBUG version is 'http/1.0' 50 Sun Nov 05 19:32:34 EST 2006 [127.0.0.1:48576] 400 Unknown Version String: http/1.0 RESPONSE: HTTP/1.0 400 Unknown Version String: http/1.0^M RESPONSE: ^M RESPONSE: ^M RESPONSE: 400 Unknown Version String: http/1.0^M RESPONSE: ^M RESPONSE:

Unknown Version String: http/1.0

^M RESPONSE: Your browser sent a request that this server could not understand.

^M RESPONSE:


IXWT PigLatinHTTP 1.0 at localhost.home.idallen.ca Port 55555
^M RESPONSE: ^M ==> TEST 10. GET with unknown version (should fail as invalid) ==> Press RETURN to execute test 10 ... ============================================================== Test 10: GET with unknown version (should fail as invalid) ============================================================== 51 Sun Nov 05 19:32:36 EST 2006 [127.0.0.1:48577] GET /idallen-16993.bin HTTP/2.0 52 DEBUG method is 'GET' 53 DEBUG uri is '/idallen-16993.bin' 54 DEBUG version is 'HTTP/2.0' 55 Sun Nov 05 19:32:36 EST 2006 [127.0.0.1:48577] 400 Unknown Version String: HTTP/2.0 RESPONSE: HTTP/1.0 400 Unknown Version String: HTTP/2.0^M RESPONSE: ^M RESPONSE: ^M RESPONSE: 400 Unknown Version String: HTTP/2.0^M RESPONSE: ^M RESPONSE:

Unknown Version String: HTTP/2.0

^M RESPONSE: Your browser sent a request that this server could not understand.

^M RESPONSE:


IXWT PigLatinHTTP 1.0 at localhost.home.idallen.ca Port 55555
^M RESPONSE: ^M ==> TEST 11. GET file with no read permissions (should fail - forbidden) ==> Press RETURN to execute test 11 ... ============================================================== Test 11: GET file with no read permissions (should fail - forbidden) ============================================================== 56 Sun Nov 05 19:32:38 EST 2006 [127.0.0.1:48578] GET /idallen-16993.000 HTTP/1.0 57 DEBUG method is 'GET' 58 DEBUG uri is '/idallen-16993.000' 59 DEBUG version is 'HTTP/1.0' 60 Sun Nov 05 19:32:38 EST 2006 [127.0.0.1:48578] 403 Forbidden: /tmp/idallen-16993.000 RESPONSE: HTTP/1.0 403 Forbidden: /tmp/idallen-16993.000^M RESPONSE: ^M RESPONSE: ^M RESPONSE: 403 Forbidden: /tmp/idallen-16993.000^M RESPONSE: ^M RESPONSE:

Forbidden: /tmp/idallen-16993.000

^M RESPONSE: You don't have permission to access the requested URL.

^M RESPONSE:


IXWT PigLatinHTTP 1.0 at localhost.home.idallen.ca Port 55555
^M RESPONSE: ^M ==> TEST 12. GET wrong file name (should fail - not found) ==> Press RETURN to execute test 12 ... ============================================================== Test 12: GET wrong file name (should fail - not found) ============================================================== 61 Sun Nov 05 19:32:41 EST 2006 [127.0.0.1:48579] GET /idallen-16993.XXX HTTP/1.0 62 DEBUG method is 'GET' 63 DEBUG uri is '/idallen-16993.XXX' 64 DEBUG version is 'HTTP/1.0' 65 Sun Nov 05 19:32:41 EST 2006 [127.0.0.1:48579] 404 Not Found: /tmp/idallen-16993.XXX RESPONSE: HTTP/1.0 404 Not Found: /tmp/idallen-16993.XXX^M RESPONSE: ^M RESPONSE: ^M RESPONSE: 404 Not Found: /tmp/idallen-16993.XXX^M RESPONSE: ^M RESPONSE:

Not Found: /tmp/idallen-16993.XXX

^M RESPONSE: The requested URL was not found on this server.

^M RESPONSE:


IXWT PigLatinHTTP 1.0 at localhost.home.idallen.ca Port 55555
^M RESPONSE: ^M *** SCRIPT EXIT ./test_plan.sh 17002 java PigLatinHTTP 55555 /tmp $ kill 17002 $ exit Script done file is typescript $ col -b test_out.txt