=========================================== 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: