=========================================== Sample output from running autotest_http.sh =========================================== - Ian! D. Allen - idallen@idallen.ca - www.idallen.com This is output from running the template auto-test script for the HTTP server. You must edit the template to properly order the tests; no marks are awarded for coping the existing script without fixing it. How to use the script (pick one): $ ./autotest_http.sh 2>&1 | tee test_out.txt $ ./autotest_http.sh 2>&1 This is a test text file for Pig Latin. SERVER: DEBUG> The file is given both a .txt and .bin extension to test that the SERVER: DEBUG> Content-Type detection works. Also, a copy with no permissions is SERVER: DEBUG> created, to test the error handling of the HTTP server. SERVER: DEBUG> SERVER: DEBUG> Now is the time for all good men to come to the aid of the party. SERVER: DEBUG> The quick brown fox jumped over the lazy dog's back. SERVER: Mon Nov 26 05:32:26 EST 2007 [127.0.0.1:47573] 200 OK RESPONSE: HTTP/1.0 200 OK^M RESPONSE: Server: IDAllen IXWT PigLatinHTTP 1.0^M RESPONSE: Date: Mon Nov 26 05:32:26 EST 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-25940.txt Mon Nov 26 05:32:27 EST 2007 on wt127-32.private.algonquincollege.com ============================================================== SEND: HEAD /alleni-25940.txt HTTP/1.0 SERVER: Mon Nov 26 05:32:27 EST 2007 [127.0.0.1:47574] HEAD /alleni-25940.txt HTTP/1.0 SERVER: DEBUG method is 'HEAD' SERVER: DEBUG uri is '/alleni-25940.txt' SERVER: DEBUG HTTP version is 'HTTP/1.0' SERVER: Mon Nov 26 05:32:27 EST 2007 [127.0.0.1:47574] 200 OK RESPONSE: HTTP/1.0 200 OK^M RESPONSE: Server: IDAllen IXWT PigLatinHTTP 1.0^M RESPONSE: Date: Mon Nov 26 05:32:27 EST 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-25940.txt Mon Nov 26 05:32:28 EST 2007 on wt127-32.private.algonquincollege.com ============================================================== SEND: GET /alleni-25940.txt HTTP/1.0 SERVER: Mon Nov 26 05:32:28 EST 2007 [127.0.0.1:47575] GET /alleni-25940.txt HTTP/1.0 SERVER: DEBUG method is 'GET' SERVER: DEBUG uri is '/alleni-25940.txt' SERVER: DEBUG HTTP version is 'HTTP/1.0' SERVER: DEBUG sendFile plain text: true SERVER: DEBUG> isthay isyay ayay esttay exttay ilefay orfay igpay atin.lay SERVER: DEBUG> ethay ilefay isyay ivengay othbay ayay txt.ay andyay bin.ay extensionyay otay esttay atthay ethay SERVER: DEBUG> ontent-typecay etectionday orks.way also,yay ayay opycay ithway onay ermissionspay isyay SERVER: DEBUG> eated,cray otay esttay ethay erroryay andlinghay ofyay ethay ttphay erver.say SERVER: DEBUG> SERVER: DEBUG> ownay isyay ethay imetay orfay allyay oodgay enmay otay omecay otay ethay aidyay ofyay ethay arty.pay SERVER: DEBUG> ethay uickqay ownbray oxfay umpedjay overyay ethay azylay og'sday ack.bay SERVER: Mon Nov 26 05:32:28 EST 2007 [127.0.0.1:47575] 200 OK RESPONSE: HTTP/1.0 200 OK^M RESPONSE: Server: IDAllen IXWT PigLatinHTTP 1.0^M RESPONSE: Date: Mon Nov 26 05:32:28 EST 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) Mon Nov 26 05:32:29 EST 2007 on wt127-32.private.algonquincollege.com ============================================================== SEND: GET /alleni-25940.txt HTTP/1.0 SERVER: Mon Nov 26 05:32:29 EST 2007 [127.0.0.1:47576] GET /alleni-25940.txt HTTP/1.0 SERVER: DEBUG method is 'GET' SERVER: DEBUG uri is '/alleni-25940.txt' SERVER: DEBUG HTTP version is 'HTTP/1.0' SERVER: DEBUG sendFile plain text: true SERVER: DEBUG> isthay isyay ayay esttay exttay ilefay orfay igpay atin.lay SERVER: DEBUG> ethay ilefay isyay ivengay othbay ayay txt.ay andyay bin.ay extensionyay otay esttay atthay ethay SERVER: DEBUG> ontent-typecay etectionday orks.way also,yay ayay opycay ithway onay ermissionspay isyay SERVER: DEBUG> eated,cray otay esttay ethay erroryay andlinghay ofyay ethay ttphay erver.say SERVER: DEBUG> SERVER: DEBUG> ownay isyay ethay imetay orfay allyay oodgay enmay otay omecay otay ethay aidyay ofyay ethay arty.pay SERVER: DEBUG> ethay uickqay ownbray oxfay umpedjay overyay ethay azylay og'sday ack.bay SERVER: Mon Nov 26 05:32:29 EST 2007 [127.0.0.1:47576] 200 OK RESPONSE: HTTP/1.0 200 OK^M RESPONSE: Server: IDAllen IXWT PigLatinHTTP 1.0^M RESPONSE: Date: Mon Nov 26 05:32:29 EST 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) Mon Nov 26 05:32:30 EST 2007 on wt127-32.private.algonquincollege.com ============================================================== SEND: GET//alleni-25940.txt HTTP/1.0 SERVER: Mon Nov 26 05:32:30 EST 2007 [127.0.0.1:47577] GET//alleni-25940.txt HTTP/1.0 SERVER: Mon Nov 26 05:32:30 EST 2007 [127.0.0.1:47577] 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) Mon Nov 26 05:32:31 EST 2007 on wt127-32.private.algonquincollege.com ============================================================== SEND: GET /alleni-25940.txtHTTP/1.0 SERVER: Mon Nov 26 05:32:31 EST 2007 [127.0.0.1:47578] GET /alleni-25940.txtHTTP/1.0 SERVER: Mon Nov 26 05:32:31 EST 2007 [127.0.0.1:47578] 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 Z-99: empty input (should fail as invalid) Mon Nov 26 05:32:32 EST 2007 on wt127-32.private.algonquincollege.com ============================================================== autotest_http.sh: WARNING: empty input file '/tmp/alleni.http.25940' SERVER: Mon Nov 26 05:32:32 EST 2007 [127.0.0.1:47579] null SERVER: Mon Nov 26 05:32:32 EST 2007 [127.0.0.1:47579] 400 Bad Request - Expecting three request fields, found nothing RESPONSE: HTTP/1.0 400 Bad Request^M RESPONSE: ^M RESPONSE: ^M RESPONSE: 400 Bad Request - Expecting three request fields, found nothing^M RESPONSE: ^M RESPONSE:

Expecting three request fields, found nothing

^M RESPONSE: Expecting three request fields, found nothing^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) Mon Nov 26 05:32:33 EST 2007 on wt127-32.private.algonquincollege.com ============================================================== SEND: get /alleni-25940.bin HTTP/1.0 SERVER: Mon Nov 26 05:32:33 EST 2007 [127.0.0.1:47580] get /alleni-25940.bin HTTP/1.0 SERVER: DEBUG method is 'get' SERVER: DEBUG uri is '/alleni-25940.bin' SERVER: DEBUG HTTP version is 'HTTP/1.0' SERVER: Mon Nov 26 05:32:33 EST 2007 [127.0.0.1:47580] 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) Mon Nov 26 05:32:34 EST 2007 on wt127-32.private.algonquincollege.com ============================================================== SEND: GET /alleni-25940.bin http/1.0 SERVER: Mon Nov 26 05:32:34 EST 2007 [127.0.0.1:47581] GET /alleni-25940.bin http/1.0 SERVER: DEBUG method is 'GET' SERVER: DEBUG uri is '/alleni-25940.bin' SERVER: DEBUG HTTP version is 'http/1.0' SERVER: Mon Nov 26 05:32:34 EST 2007 [127.0.0.1:47581] 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) Mon Nov 26 05:32:35 EST 2007 on wt127-32.private.algonquincollege.com ============================================================== SEND: GET /alleni-25940.bin HTTP/2.0 SERVER: Mon Nov 26 05:32:35 EST 2007 [127.0.0.1:47582] GET /alleni-25940.bin HTTP/2.0 SERVER: DEBUG method is 'GET' SERVER: DEBUG uri is '/alleni-25940.bin' SERVER: DEBUG HTTP version is 'HTTP/2.0' SERVER: Mon Nov 26 05:32:35 EST 2007 [127.0.0.1:47582] 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) Mon Nov 26 05:32:36 EST 2007 on wt127-32.private.algonquincollege.com ============================================================== SEND: GET /alleni-25940.000 HTTP/1.0 SERVER: Mon Nov 26 05:32:36 EST 2007 [127.0.0.1:47583] GET /alleni-25940.000 HTTP/1.0 SERVER: DEBUG method is 'GET' SERVER: DEBUG uri is '/alleni-25940.000' SERVER: DEBUG HTTP version is 'HTTP/1.0' SERVER: Mon Nov 26 05:32:36 EST 2007 [127.0.0.1:47583] 403 Forbidden - /tmp/alleni-25940.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-25940.000 - You don't have permission to access the requested URL.^M RESPONSE: ^M RESPONSE:

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

^M RESPONSE: /tmp/alleni-25940.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) Mon Nov 26 05:32:37 EST 2007 on wt127-32.private.algonquincollege.com ============================================================== SEND: GET /alleni-25940.XXX HTTP/1.0 SERVER: Mon Nov 26 05:32:37 EST 2007 [127.0.0.1:47584] GET /alleni-25940.XXX HTTP/1.0 SERVER: DEBUG method is 'GET' SERVER: DEBUG uri is '/alleni-25940.XXX' SERVER: DEBUG HTTP version is 'HTTP/1.0' SERVER: Mon Nov 26 05:32:37 EST 2007 [127.0.0.1:47584] 404 Not Found - /tmp/alleni-25940.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-25940.XXX - The requested URL was not found on this server.^M RESPONSE: ^M RESPONSE:

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

^M RESPONSE: /tmp/alleni-25940.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) =============================== # Fix up this set of tests to have a logical order and numbering. # No marks are awarded for copying the tests above verbatim. # Remove these comment lines when you reorganize the tests. # More test categories and more tests go here ... 25957 java *** autotest_http.sh EXIT