=========================================== Sample output from running autotest_http.sh =========================================== - Ian! D. Allen - idallen@idallen.ca - www.idallen.com Usage (prompting and displaying copy of tests on screen): $ ./autotest_http.sh 2>&1 | cat -v | tee test_out.txt Here is a sample of the output that appears in test_out.txt: autotest_http.sh: Using web directory on wt127-31: /tmp autotest_http.sh: Using command line: java PigLatinHTTP 55555 /tmp 1 Using: port 55555 wwwhome /tmp 2 PigLatinHTTP accepting connections on port 55555 =============================== You could echo your assignment label here. =============================== =============================== Category A: Some Category of Tests (FIX ME) =============================== ==> TEST A-1: HEAD a file with a non-text name: alleni-10641.bin ==> Press RETURN to execute this test ... ============================================================== Test A-1: HEAD a file with a non-text name: alleni-10641.bin Tue Mar 20 10:43:03 EDT 2007 on wt127-31 ============================================================== 3 Tue Mar 20 10:43:03 EDT 2007 [127.0.0.1:34018] HEAD /alleni-10641.bin HTTP/1.0 4 DEBUG method is 'HEAD' 5 DEBUG uri is '/alleni-10641.bin' 6 DEBUG HTTP version is 'HTTP/1.0' 7 Tue Mar 20 10:43:03 EDT 2007 [127.0.0.1:34018] 200 OK RESPONSE: HTTP/1.0 200 OK^M RESPONSE: Server: IDAllen IXWT PigLatinHTTP 1.0^M RESPONSE: Date: Tue Mar 20 10:43:03 EDT 2007^M RESPONSE: Content-Type: application/octet-stream^M RESPONSE: Last-Modified: Fri Jan 01 00:00:00 EST 1999^M RESPONSE: Content-Length: 349^M RESPONSE: ^M ==> TEST V-9: GET a file with a non-text name: alleni-10641.bin ==> Press RETURN to execute this test ... ============================================================== Test V-9: GET a file with a non-text name: alleni-10641.bin Tue Mar 20 10:43:11 EDT 2007 on wt127-31 ============================================================== 8 Tue Mar 20 10:43:11 EDT 2007 [127.0.0.1:34019] GET /alleni-10641.bin HTTP/1.0 9 DEBUG method is 'GET' 10 DEBUG uri is '/alleni-10641.bin' 11 DEBUG HTTP version is 'HTTP/1.0' 12 DEBUG sendFile plain text: false 13 DEBUG> This is a test text file for Pig Latin. 14 DEBUG> The file is given both a .txt and .bin extension to test that the 15 DEBUG> Content-Type detection works. Also, a copy with no permissions is 16 DEBUG> created, to test the error handling of the HTTP server. 17 DEBUG> 18 DEBUG> Now is the time for all good men to come to the aid of the party. 19 DEBUG> The quick brown fox jumped over the lazy dog's back. 20 Tue Mar 20 10:43:11 EDT 2007 [127.0.0.1:34019] 200 OK RESPONSE: HTTP/1.0 200 OK^M RESPONSE: Server: IDAllen IXWT PigLatinHTTP 1.0^M RESPONSE: Date: Tue Mar 20 10:43:11 EDT 2007^M RESPONSE: Content-Type: application/octet-stream^M RESPONSE: Last-Modified: Fri Jan 01 00:00:00 EST 1999^M RESPONSE: Content-Length: 349^M RESPONSE: ^M RESPONSE: This is a test text file for Pig Latin. RESPONSE: The file is given both a .txt and .bin extension to test that the RESPONSE: Content-Type detection works. Also, a copy with no permissions is RESPONSE: created, to test the error handling of the HTTP server. RESPONSE: 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 Q-3: HEAD a file with a text name: alleni-10641.txt ==> Press RETURN to execute this test ... ============================================================== Test Q-3: HEAD a file with a text name: alleni-10641.txt Tue Mar 20 10:43:14 EDT 2007 on wt127-31 ============================================================== 21 Tue Mar 20 10:43:14 EDT 2007 [127.0.0.1:34020] HEAD /alleni-10641.txt HTTP/1.0 22 DEBUG method is 'HEAD' 23 DEBUG uri is '/alleni-10641.txt' 24 DEBUG HTTP version is 'HTTP/1.0' 25 Tue Mar 20 10:43:14 EDT 2007 [127.0.0.1:34020] 200 OK RESPONSE: HTTP/1.0 200 OK^M RESPONSE: Server: IDAllen IXWT PigLatinHTTP 1.0^M RESPONSE: Date: Tue Mar 20 10:43:14 EDT 2007^M RESPONSE: Content-Type: text/plain^M RESPONSE: Last-Modified: Fri Jan 01 00:00:00 EST 1999^M RESPONSE: ^M ==> TEST D-4: GET a file with a text name: alleni-10641.txt ==> Press RETURN to execute this test ... ============================================================== Test D-4: GET a file with a text name: alleni-10641.txt Tue Mar 20 10:43:25 EDT 2007 on wt127-31 ============================================================== 26 Tue Mar 20 10:43:25 EDT 2007 [127.0.0.1:34021] GET /alleni-10641.txt HTTP/1.0 27 DEBUG method is 'GET' 28 DEBUG uri is '/alleni-10641.txt' 29 DEBUG HTTP version is 'HTTP/1.0' 30 DEBUG sendFile plain text: true 31 DEBUG> isthay isyay ayay esttay exttay ilefay orfay igpay atin.lay 32 DEBUG> ethay ilefay isyay ivengay othbay ayay txt.ay andyay bin.ay extensionyay otay esttay atthay ethay 33 DEBUG> ontent-typecay etectionday orks.way also,yay ayay opycay ithway onay ermissionspay isyay 34 DEBUG> eated,cray otay esttay ethay erroryay andlinghay ofyay ethay ttphay erver.say 35 DEBUG> 36 DEBUG> ownay isyay ethay imetay orfay allyay oodgay enmay otay omecay otay ethay aidyay ofyay ethay arty.pay 37 DEBUG> ethay uickqay ownbray oxfay umpedjay overyay ethay azylay og'sday ack.bay 38 Tue Mar 20 10:43:25 EDT 2007 [127.0.0.1:34021] 200 OK RESPONSE: HTTP/1.0 200 OK^M RESPONSE: Server: IDAllen IXWT PigLatinHTTP 1.0^M RESPONSE: Date: Tue Mar 20 10:43:25 EDT 2007^M RESPONSE: Content-Type: text/plain^M RESPONSE: Last-Modified: Fri Jan 01 00:00:00 EST 1999^M RESPONSE: ^M RESPONSE: isthay isyay ayay esttay exttay ilefay orfay igpay atin.lay RESPONSE: ethay ilefay isyay ivengay othbay ayay txt.ay andyay bin.ay extensionyay otay esttay atthay ethay RESPONSE: ontent-typecay etectionday orks.way also,yay ayay opycay ithway onay ermissionspay isyay RESPONSE: eated,cray otay esttay ethay erroryay andlinghay ofyay ethay ttphay erver.say RESPONSE: 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 Y-5: GET with extra spaces (should work) ==> Press RETURN to execute this test ... ============================================================== Test Y-5: GET with extra spaces (should work) Tue Mar 20 10:43:27 EDT 2007 on wt127-31 ============================================================== 39 Tue Mar 20 10:43:27 EDT 2007 [127.0.0.1:34022] GET /alleni-10641.txt HTTP/1.0 40 DEBUG method is 'GET' 41 DEBUG uri is '/alleni-10641.txt' 42 DEBUG HTTP version is 'HTTP/1.0' 43 DEBUG sendFile plain text: true 44 DEBUG> isthay isyay ayay esttay exttay ilefay orfay igpay atin.lay 45 DEBUG> ethay ilefay isyay ivengay othbay ayay txt.ay andyay bin.ay extensionyay otay esttay atthay ethay 46 DEBUG> ontent-typecay etectionday orks.way also,yay ayay opycay ithway onay ermissionspay isyay 47 DEBUG> eated,cray otay esttay ethay erroryay andlinghay ofyay ethay ttphay erver.say 48 DEBUG> 49 DEBUG> ownay isyay ethay imetay orfay allyay oodgay enmay otay omecay otay ethay aidyay ofyay ethay arty.pay 50 DEBUG> ethay uickqay ownbray oxfay umpedjay overyay ethay azylay og'sday ack.bay 51 Tue Mar 20 10:43:27 EDT 2007 [127.0.0.1:34022] 200 OK RESPONSE: HTTP/1.0 200 OK^M RESPONSE: Server: IDAllen IXWT PigLatinHTTP 1.0^M RESPONSE: Date: Tue Mar 20 10:43:27 EDT 2007^M RESPONSE: Content-Type: text/plain^M RESPONSE: Last-Modified: Fri Jan 01 00:00:00 EST 1999^M RESPONSE: ^M RESPONSE: isthay isyay ayay esttay exttay ilefay orfay igpay atin.lay RESPONSE: ethay ilefay isyay ivengay othbay ayay txt.ay andyay bin.ay extensionyay otay esttay atthay ethay RESPONSE: ontent-typecay etectionday orks.way also,yay ayay opycay ithway onay ermissionspay isyay RESPONSE: eated,cray otay esttay ethay erroryay andlinghay ofyay ethay ttphay erver.say RESPONSE: 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 F-2: GET invalid syntax: missing leading blank (should fail as invalid) ==> Press RETURN to execute this test ... ============================================================== Test F-2: GET invalid syntax: missing leading blank (should fail as invalid) Tue Mar 20 10:43:30 EDT 2007 on wt127-31 ============================================================== 52 Tue Mar 20 10:43:30 EDT 2007 [127.0.0.1:34023] GET//alleni-10641.txt HTTP/1.0 53 Tue Mar 20 10:43:30 EDT 2007 [127.0.0.1:34023] 400 Bad Request - Expecting exactly three request fields, found 2 RESPONSE: HTTP/1.0 400 Bad Request^M RESPONSE: ^M RESPONSE: ^M RESPONSE: 400 Bad Request - Expecting exactly three request fields, found 2^M RESPONSE: ^M RESPONSE:

Expecting exactly three request fields, found 2

^M RESPONSE: Expecting exactly three request fields, found 2^M RESPONSE:
IDAllen IXWT PigLatinHTTP 1.0 at localhost.localdomain Port 55555
^M RESPONSE: ^M ==> TEST P-7: GET invalid syntax: missing trailing blank (should fail as invalid) ==> Press RETURN to execute this test ... ============================================================== Test P-7: GET invalid syntax: missing trailing blank (should fail as invalid) Tue Mar 20 10:43:32 EDT 2007 on wt127-31 ============================================================== 54 Tue Mar 20 10:43:32 EDT 2007 [127.0.0.1:34024] GET /alleni-10641.txtHTTP/1.0 55 Tue Mar 20 10:43:32 EDT 2007 [127.0.0.1:34024] 400 Bad Request - Expecting exactly three request fields, found 2 RESPONSE: HTTP/1.0 400 Bad Request^M RESPONSE: ^M RESPONSE: ^M RESPONSE: 400 Bad Request - Expecting exactly three request fields, found 2^M RESPONSE: ^M RESPONSE:

Expecting exactly three request fields, found 2

^M RESPONSE: Expecting exactly three request fields, found 2^M RESPONSE:
IDAllen IXWT PigLatinHTTP 1.0 at localhost.localdomain Port 55555
^M RESPONSE: ^M ==> TEST R-6: GET in wrong case (should fail as invalid) ==> Press RETURN to execute this test ... ============================================================== Test R-6: GET in wrong case (should fail as invalid) Tue Mar 20 10:43:37 EDT 2007 on wt127-31 ============================================================== 56 Tue Mar 20 10:43:37 EDT 2007 [127.0.0.1:34025] get /alleni-10641.bin HTTP/1.0 57 DEBUG method is 'get' 58 DEBUG uri is '/alleni-10641.bin' 59 DEBUG HTTP version is 'HTTP/1.0' 60 Tue Mar 20 10:43:37 EDT 2007 [127.0.0.1:34025] 405 Method Not Allowed - Unknown request method: get - expecting GET or HEAD RESPONSE: HTTP/1.0 405 Method Not Allowed^M RESPONSE: ^M RESPONSE: ^M RESPONSE: 405 Method Not Allowed - Unknown request method: get - expecting GET or HEAD^M RESPONSE: ^M RESPONSE:

Unknown request method: get - expecting GET or HEAD

^M RESPONSE: Unknown request method: get - expecting GET or HEAD^M RESPONSE:
IDAllen IXWT PigLatinHTTP 1.0 at localhost.localdomain Port 55555
^M RESPONSE: ^M ==> TEST N-8: HTTP in wrong case (should fail as invalid) ==> Press RETURN to execute this test ... ============================================================== Test N-8: HTTP in wrong case (should fail as invalid) Tue Mar 20 10:43:44 EDT 2007 on wt127-31 ============================================================== 61 Tue Mar 20 10:43:44 EDT 2007 [127.0.0.1:34026] GET /alleni-10641.bin http/1.0 62 DEBUG method is 'GET' 63 DEBUG uri is '/alleni-10641.bin' 64 DEBUG HTTP version is 'http/1.0' 65 Tue Mar 20 10:43:44 EDT 2007 [127.0.0.1:34026] 400 Bad Request - Unknown Version String: http/1.0 - expecting HTTP/1.0 or HTTP/1.1 RESPONSE: HTTP/1.0 400 Bad Request^M RESPONSE: ^M RESPONSE: ^M RESPONSE: 400 Bad Request - Unknown Version String: http/1.0 - expecting HTTP/1.0 or HTTP/1.1^M RESPONSE: ^M RESPONSE:

Unknown Version String: http/1.0 - expecting HTTP/1.0 or HTTP/1.1

^M RESPONSE: Unknown Version String: http/1.0 - expecting HTTP/1.0 or HTTP/1.1^M RESPONSE:
IDAllen IXWT PigLatinHTTP 1.0 at localhost.localdomain Port 55555
^M RESPONSE: ^M ==> TEST M-5: GET with unknown version (should fail as invalid) ==> Press RETURN to execute this test ... ============================================================== Test M-5: GET with unknown version (should fail as invalid) Tue Mar 20 10:43:49 EDT 2007 on wt127-31 ============================================================== 66 Tue Mar 20 10:43:49 EDT 2007 [127.0.0.1:34027] GET /alleni-10641.bin HTTP/2.0 67 DEBUG method is 'GET' 68 DEBUG uri is '/alleni-10641.bin' 69 DEBUG HTTP version is 'HTTP/2.0' 70 Tue Mar 20 10:43:49 EDT 2007 [127.0.0.1:34027] 400 Bad Request - Unknown Version String: HTTP/2.0 - expecting HTTP/1.0 or HTTP/1.1 RESPONSE: HTTP/1.0 400 Bad Request^M RESPONSE: ^M RESPONSE: ^M RESPONSE: 400 Bad Request - Unknown Version String: HTTP/2.0 - expecting HTTP/1.0 or HTTP/1.1^M RESPONSE: ^M RESPONSE:

Unknown Version String: HTTP/2.0 - expecting HTTP/1.0 or HTTP/1.1

^M RESPONSE: Unknown Version String: HTTP/2.0 - expecting HTTP/1.0 or HTTP/1.1^M RESPONSE:
IDAllen IXWT PigLatinHTTP 1.0 at localhost.localdomain Port 55555
^M RESPONSE: ^M ==> TEST U-4: GET file with no read permissions (should fail - forbidden) ==> Press RETURN to execute this test ... ============================================================== Test U-4: GET file with no read permissions (should fail - forbidden) Tue Mar 20 10:44:02 EDT 2007 on wt127-31 ============================================================== 71 Tue Mar 20 10:44:02 EDT 2007 [127.0.0.1:34029] GET /alleni-10641.000 HTTP/1.0 72 DEBUG method is 'GET' 73 DEBUG uri is '/alleni-10641.000' 74 DEBUG HTTP version is 'HTTP/1.0' 75 Tue Mar 20 10:44:02 EDT 2007 [127.0.0.1:34029] 403 Forbidden - /tmp/alleni-10641.000 - You don't have permission to access the requested URL. RESPONSE: HTTP/1.0 403 Forbidden^M RESPONSE: ^M RESPONSE: ^M RESPONSE: 403 Forbidden - /tmp/alleni-10641.000 - You don't have permission to access the requested URL.^M RESPONSE: ^M RESPONSE:

/tmp/alleni-10641.000 - You don't have permission to access the requested URL.

^M RESPONSE: /tmp/alleni-10641.000 - You don't have permission to access the requested URL.^M RESPONSE:
IDAllen IXWT PigLatinHTTP 1.0 at localhost.localdomain Port 55555
^M RESPONSE: ^M ==> TEST W-1: GET wrong file name (should fail - not found) ==> Press RETURN to execute this test ... ============================================================== Test W-1: GET wrong file name (should fail - not found) Tue Mar 20 10:44:11 EDT 2007 on wt127-31 ============================================================== 76 Tue Mar 20 10:44:11 EDT 2007 [127.0.0.1:34030] GET /alleni-10641.XXX HTTP/1.0 77 DEBUG method is 'GET' 78 DEBUG uri is '/alleni-10641.XXX' 79 DEBUG HTTP version is 'HTTP/1.0' 80 Tue Mar 20 10:44:11 EDT 2007 [127.0.0.1:34030] 404 Not Found - /tmp/alleni-10641.XXX - The requested URL was not found on this server. RESPONSE: HTTP/1.0 404 Not Found^M RESPONSE: ^M RESPONSE: ^M RESPONSE: 404 Not Found - /tmp/alleni-10641.XXX - The requested URL was not found on this server.^M RESPONSE: ^M RESPONSE:

/tmp/alleni-10641.XXX - The requested URL was not found on this server.

^M RESPONSE: /tmp/alleni-10641.XXX - The requested URL was not found on this server.^M RESPONSE:
IDAllen IXWT PigLatinHTTP 1.0 at localhost.localdomain Port 55555
^M RESPONSE: ^M =============================== Category ?: Some Category of Tests (FIX ME) =============================== 10658 java *** SCRIPT EXIT autotest_http.sh