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