calebkbrad / calebsserver

Implementation of an HTTP compliant web server from scratch. Done as a semester-long project for CS 531.
0 stars 0 forks source link

Assignment 5 #13

Open ibnesayeed opened 1 year ago

ibnesayeed commented 1 year ago
================================================================================
Assignment: cs531a5
Student: Caleb Bradford <cs_cbrad022@cs.odu.edu>
Time: 20221205-200617 UTC
Repository: https://github.com/calebkbrad/calebsserver/tree/a5
Server: cs531-cs_cbrad022
================================================================================

Deploying server: cs531-cs_cbrad022

Cloning the `https://github.com/calebkbrad/calebsserver.git` repo and checking the `a5` branch/tag out
Released at: 2022-11-30T04:56:07Z
Step 1/13 : FROM    python:3
 ---> e285995a3494
Step 2/13 : LABEL   maintainer = "Caleb Bradford <@calebkbradford>"
 ---> Using cache
 ---> 74579e05b181
Step 3/13 : ENV WEBROOT="/var/www"
 ---> Using cache
 ---> d2ddd397f43b
Step 4/13 : WORKDIR ${WEBROOT}
 ---> Using cache
 ---> 5d9b75cadc40
Step 5/13 : RUN     wget https://raw.githubusercontent.com/ibnesayeed/webserver-tester/master/sample/cs531-test-files.tar.gz         && tar xvzf cs531-test-files.tar.gz         && rm -rf cs531-test-files.tar.gz
 ---> Using cache
 ---> fd41172e0a28
Step 6/13 : WORKDIR /app
 ---> Using cache
 ---> 635268e75bbc
Step 7/13 : COPY    src/server.py /app
 ---> Using cache
 ---> 73bd9617484c
Step 8/13 : COPY    errorpages /app/errorpages
 ---> Using cache
 ---> 07a23b381938
Step 9/13 : COPY    settings /app/settings
 ---> Using cache
 ---> 392c70a435b4
Step 10/13 : RUN     touch /app/access.log
 ---> Using cache
 ---> caa19c100c79
Step 11/13 : RUN     chmod a+x server.py
 ---> Using cache
 ---> 05066e490079
Step 12/13 : RUN     pip install pyyaml
 ---> Using cache
 ---> 7685082e6e5d
Step 13/13 : ENTRYPOINT [ "./server.py" ]
 ---> Using cache
 ---> e61518d251ba
Successfully built e61518d251ba
Successfully tagged cs531/cs_cbrad022:a5

A new container is created and the server `cs531-cs_cbrad022` is deployed successfully

Testing server: cs531-cs_cbrad022 against cs531a5 test suite

Testing cs531-cs_cbrad022:80
--------------------------------------------------------------------------------
test_protected_options_trace_full_method_support: Test whether OPTIONS and TRACE methods are auth protected and return full HTTP method support
* Connecting to the `cs531-cs_cbrad022:80` server
* Request data sent
* Response data read
* Response parsed
* Status is `401`
* `WWW-Authenticate` header is present
* `WWW-Authenticate` header has value `Basic realm="Fried Twice"`
* `Content-Type` header is present
* `Content-Type` header begins with `text/html`
* `Transfer-Encoding` header is present
* `Transfer-Encoding` header has value `chunked`
[FAILED] Chunk descriptor `HTTP/1.1 200 OK` must begin with a Hexadecimal number
[FAILED] ASSERTION: Failed to extract payload

> OPTIONS http://cs531-cs_cbrad022/a5-test/limited3/protected HTTP/1.1
> Host: cs531-cs_cbrad022:80
> User-Agent: CS531 Assignment 5 Tester/1670270784
> 
> TRACE /a5-test/env.cgi?var1=foo&var2=bar HTTP/1.1
> Host: cs531-cs_cbrad022:80
> 
> OPTIONS http://cs531-cs_cbrad022/a5-test/limited3/env.cgi HTTP/1.1
> Host: cs531-cs_cbrad022:80
> User-Agent: CS531 Assignment 5 Tester/1670270784
> Referer: http://cs531-cs_cbrad022/a5-test/index.html
> Authorization: Basic amJvbGxlbjpqYm9sbGVu
> Connection: close
> 

< HTTP/1.1 401 Unauthorized
< Date: Mon, 05 Dec 2022 08:06:24 GMT
< Server: calebsserver
< Transfer-Encoding: chunked
< WWW-Authenticate: Basic realm="Fried Twice"
< Content-Type: text/html
< 
< HTTP/1.1 401 Unauthorized
< Date: Mon, 05 Dec 2022 08:06:24 GMT
< Server: calebsserver
< Transfer-Encoding: chunked
< WWW-Authenticate: Basic realm="Fried Twice"
< Content-Type: text/html
< 
* [Payload redacted (770 bytes)]

--------------------------------------------------------------------------------
test_multiple_cgi_scripts: Test whether CGI scripts are executed and resulted in custom status, directory listing, and redirection
* Connecting to the `cs531-cs_cbrad022:80` server
* Request data sent
* Response data read
[FAILED] Using `LF` as header separator instead of `CRLF`
[FAILED] Malformed status line `Status: 678 This is not a real HTTP status code`

> GET http://cs531-cs_cbrad022/a5-test/status.cgi HTTP/1.1
> Host: cs531-cs_cbrad022:80
> 
> GET http://cs531-cs_cbrad022/a5-test/ls.cgi HTTP/1.1
> Host: cs531-cs_cbrad022:80
> 
> GET http://cs531-cs_cbrad022/a5-test/location.cgi HTTP/1.1
> Host: cs531-cs_cbrad022:80
> Connection: close
> 

< Status: 678 This is not a real HTTP status code
< 
* [Payload redacted (1816 bytes)]

--------------------------------------------------------------------------------
test_cgi_auth_internal_error: Test whether CGI scripts are protected and return 500 Internal Server Error on malformed output
* Connecting to the `cs531-cs_cbrad022:80` server
* Request data sent
* Response data read
* Response parsed
* Status is `401`
* `Content-Type` header is present
* `Content-Type` header begins with `text/html`
* `Transfer-Encoding` header is present
* `Transfer-Encoding` header has value `chunked`
* `WWW-Authenticate` header is present
* `WWW-Authenticate` header begins with `Digest`
[FAILED] Chunk descriptor `<p>Sorry, I only show that to people with the proper permits.</p>.:` must begin with a Hexadecimal number
[FAILED] ASSERTION: Failed to extract payload

> GET http://cs531-cs_cbrad022/a5-test/limited4/foo/barbar.txt HTTP/1.1
> Host: cs531-cs_cbrad022:80
> 
> GET http://cs531-cs_cbrad022/a5-test/500.cgi HTTP/1.1
> Host: cs531-cs_cbrad022:80
> Connection: close
> 

< HTTP/1.1 401 Unauthorized
< Date: Mon, 05 Dec 2022 08:06:24 GMT
< Server: calebsserver
< Transfer-Encoding: chunked
< WWW-Authenticate: Digest realm="Colonial Place", domain="/a5-test/limited4/foo/barbar.txt", qop="auth", nonce="RGF0ZTogTW9uLCAwNSBEZWMgMjAyMiAwODowNjoyNCBHTVQNCiBmYmIyMzVjOTM5MDNjM2UzM2NkMGZmYzVhMjJmZDIxMg==", algorithm="MD5", opaque="740ceb308872f356dee6cbfc5e52ff76"
< Content-Type: text/html
< 
< HTTP/1.1 401 Unauthorized
< Date: Mon, 05 Dec 2022 08:06:24 GMT
< Server: calebsserver
< Transfer-Encoding: chunked
< WWW-Authenticate: Digest realm="Colonial Place", domain="/a5-test/limited4/foo/barbar.txt", qop="auth", nonce="RGF0ZTogTW9uLCAwNSBEZWMgMjAyMiAwODowNjoyNCBHTVQNCiBmYmIyMzVjOTM5MDNjM2UzM2NkMGZmYzVhMjJmZDIxMg==", algorithm="MD5", opaque="740ceb308872f356dee6cbfc5e52ff76"
< Content-Type: text/html
< 
* [Payload redacted (1816 bytes)]

--------------------------------------------------------------------------------
test_allow_no_put_delete: Test whether Allow header is present with values other than PUT and DELETE
* Connecting to the `cs531-cs_cbrad022:80` server
* Request data sent
* Response data read
* Response parsed
* Status is `200`
* `Allow` header is present
* `Allow` header contains `GET`
* `Allow` header contains `HEAD`
* `Allow` header contains `OPTIONS`
* `Allow` header contains `TRACE`
* `Allow` header contains `POST`
* `Allow` header is present
* `Allow` header does not contain `PUT`
* `Allow` header does not contain `DELETE`
[PASSED]

> OPTIONS http://cs531-cs_cbrad022/a5-test/env.cgi HTTP/1.1
> Host: cs531-cs_cbrad022:80
> User-Agent: CS531 Assignment 5 Tester/1670270784
> Connection: close
> 

< HTTP/1.1 200 OK
< Date: Mon, 05 Dec 2022 08:06:24 GMT
< Server: calebsserver
< Allow: GET, HEAD, TRACE, OPTIONS, POST
< Connection: close

--------------------------------------------------------------------------------
test_delete_not_allowed: Test whether Allow header is present with appropriate values other than DELETE in the 405 Not Allowed response
* Connecting to the `cs531-cs_cbrad022:80` server
* Request data sent
* Response data read
* Response parsed
* Status is `405`
* `Allow` header is present
* `Allow` header contains `GET`
* `Allow` header contains `HEAD`
* `Allow` header contains `OPTIONS`
* `Allow` header contains `TRACE`
* `Allow` header is present
* `Allow` header does not contain `DELETE`
[PASSED]

> DELETE /a5-test/index.html.denmark HTTP/1.1
> Host: cs531-cs_cbrad022
> Connection: close
> 

< HTTP/1.1 405 Method Not Allowed
< Date: Mon, 05 Dec 2022 08:06:24 GMT
< Server: calebsserver
< Allow: GET, HEAD, TRACE, OPTIONS, POST
< Content-Type: text/html
< Transfer-Encoding: chunked
< Connection: close
< 
* [Payload redacted (54 bytes)]

--------------------------------------------------------------------------------
test_put_not_allowed: Test whether Allow header is present with appropriate values other than PUT in the 405 Not Allowed response
* Connecting to the `cs531-cs_cbrad022:80` server
* Request data sent
* Response data read
* Response parsed
* Status is `405`
* `Allow` header is present
* `Allow` header contains `GET`
* `Allow` header contains `HEAD`
* `Allow` header contains `OPTIONS`
* `Allow` header contains `TRACE`
* `Allow` header contains `DELETE`
* `Allow` header is present
* `Allow` header does not contain `PUT`
[PASSED]

> PUT http://cs531-cs_cbrad022/a5-test/limited1/foobar.txt HTTP/1.1
> Host: cs531-cs_cbrad022:80
> User-Agent: CS531 Assignment 5 Tester/1670270784
> Authorization: Basic YmRhOmJkYQ==
> Connection: close
> Content-Type: text/plain
> Content-Length: 63
> 
> here comes a PUT method
> 
> in text/plain format
> 
> hooray for PUT!

< HTTP/1.1 405 Method Not Allowed
< Date: Mon, 05 Dec 2022 08:06:24 GMT
< Server: calebsserver
< Allow: GET, HEAD, TRACE, OPTIONS, POST, DELETE
< Content-Type: text/html
< Transfer-Encoding: chunked
< Connection: close
< 
* [Payload redacted (54 bytes)]

--------------------------------------------------------------------------------
test_put_success_auth_digest: Test whether PUT method creates a new resource with the request payload after successful Digest auth
* Connecting to the `cs531-cs_cbrad022:80` server
* Request data sent
* Response data read
* Response parsed
[FAILED] ASSERTION: Status expected `201`, returned `401`

> PUT http://cs531-cs_cbrad022/a5-test/limited4/foo/barbar.txt HTTP/1.1
> Host: cs531-cs_cbrad022:80
> Authorization: Digest username="bda", realm="Colonial Place", uri="http://cs531-cs_cbrad022/a5-test/limited4/foo/barbar.txt", qop=auth, nonce="RGF0ZTogTW9uLCAwNSBEZWMgMjAyMiAwODowNjoyNCBHTVQNCiBmYmIyMzVjOTM5MDNjM2UzM2NkMGZmYzVhMjJmZDIxMg", nc=00000001, cnonce="014a54548c61ba03827ef6a4dc2f7b4c", response="f344e3251a066d871df10f4a1920ed9b"
> Connection: close
> Content-Type: text/plain
> Content-Length: 65
> 
> here comes a PUT method
> 
> in text/plain format
> 
> hooray for PUT!!!

< HTTP/1.1 401 Unauthorized
< Date: Mon, 05 Dec 2022 08:06:24 GMT
< Server: calebsserver
< Transfer-Encoding: chunked
< WWW-Authenticate: Digest realm="Colonial Place", domain="/a5-test/limited4/foo/barbar.txt", qop="auth", nonce="RGF0ZTogTW9uLCAwNSBEZWMgMjAyMiAwODowNjoyNCBHTVQNCiBmYmIyMzVjOTM5MDNjM2UzM2NkMGZmYzVhMjJmZDIxMg==", algorithm="MD5", opaque="740ceb308872f356dee6cbfc5e52ff76"
< Content-Type: text/html

--------------------------------------------------------------------------------
test_put_success_auth_basic: Test whether PUT method creates a new resource with the request payload after successful Basic auth
* Connecting to the `cs531-cs_cbrad022:80` server
* Request data sent
* Response data read
* Response parsed
* Status is `201`
[PASSED]

> PUT http://cs531-cs_cbrad022/a5-test/limited3/foobar.txt HTTP/1.1
> Host: cs531-cs_cbrad022:80
> User-Agent: CS531 Assignment 5 Tester/1670270784
> Authorization: Basic YmRhOmJkYQ==
> Connection: close
> Content-Type: text/plain
> Content-Length: 63
> 
> here comes a PUT method
> 
> in text/plain format
> 
> hooray for PUT!

< HTTP/1.1 201 Created
< Date: Mon, 05 Dec 2022 08:06:24 GMT
< Server: calebsserver
< Content-Type: text/html
< Transfer-Encoding: chunked
< Connection: close
< 
* [Payload redacted (45 bytes)]

--------------------------------------------------------------------------------
test_auth_created_files: Test whether files created using PUT in earlier tests are auth protected properly
* Connecting to the `cs531-cs_cbrad022:80` server
* Request data sent
* Response data read
* Response parsed
* Status is `200`
* `ETag` header is present
* `ETag` is not empty and properly formatted in double quotes as `"800e22c31460dd1e2f7059b830c70f1d"`
* `Content-Type` header is present
* `Content-Type` header begins with `text/plain`
* `Content-Length` header is present
* `Content-Length` header has value `63`
* Payload contains `here comes a PUT method`
* Payload contains `hooray for PUT!`
* Parsing second response
* Response parsed
* Status is `401`
* `Content-Type` header is present
* `Content-Type` header begins with `text/html`
* `Transfer-Encoding` header is present
* `Transfer-Encoding` header has value `chunked`
* `WWW-Authenticate` header is present
* `WWW-Authenticate` header begins with `Digest`
[PASSED]

> GET /a5-test/limited3/foobar.txt HTTP/1.1
> User-Agent: CS531 Assignment 5 Tester/1670270784
> Authorization: Basic YmRhOmJkYQ==
> Host: cs531-cs_cbrad022:80
> 
> GET http://cs531-cs_cbrad022/a5-test/limited4/foo/barbar.txt HTTP/1.1
> Host: cs531-cs_cbrad022:80
> Authorization: Digest username="bda", realm="Colonial Place", uri="http://cs531-cs_cbrad022/a5-test/limited4/foo/barbar.txt", qop=auth, nonce="RGF0ZTogTW9uLCAwNSBEZWMgMjAyMiAwODowNjoyNCBHTVQNCiBmYmIyMzVjOTM5MDNjM2UzM2NkMGZmYzVhMjJmZDIxMg", nc=00000002, cnonce="014a54548c61ba03827ef6a4dc2f7b4c", response="aa1229b81e2ef6cb0ac0e68a86fe3d50"
> Connection: close
> 

< HTTP/1.1 200 OK
< Date: Mon, 05 Dec 2022 08:06:24 GMT
< Server: calebsserver
< Content-Type: text/plain
< Last-Modified: Mon, 05 Dec 2022 08:06:24 GMT
< Content-Length: 63
< ETag: "800e22c31460dd1e2f7059b830c70f1d"
< 
< here comes a PUT method
< 
< in text/plain format
< 
< hooray for PUT!
< HTTP/1.1 401 Unauthorized
< Date: Mon, 05 Dec 2022 08:06:24 GMT
< Server: calebsserver
< Transfer-Encoding: chunked
< WWW-Authenticate: Digest realm="Colonial Place", domain="/a5-test/limited4/foo/barbar.txt", qop="auth", nonce="RGF0ZTogTW9uLCAwNSBEZWMgMjAyMiAwODowNjoyNCBHTVQNCiBmYmIyMzVjOTM5MDNjM2UzM2NkMGZmYzVhMjJmZDIxMg==", algorithm="MD5", opaque="740ceb308872f356dee6cbfc5e52ff76"
< Content-Type: text/html
< 
* [Payload redacted (65 bytes)]

--------------------------------------------------------------------------------
test_delete_verify: Test whether a DELETE request removes a resource and returns 404 on a subsequent GET
* Connecting to the `cs531-cs_cbrad022:80` server
* Request data sent
* Response data read
* Response parsed
* Status is `200`
[FAILED] Chunk descriptor `<p>That resource was successully deleted</p>` must begin with a Hexadecimal number
[FAILED] ASSERTION: Failed to extract payload

> DELETE /a5-test/limited3/foobar.txt HTTP/1.1
> User-Agent: CS531 Assignment 5 Tester/1670270784
> Authorization: Basic YmRhOmJkYQ==
> Host: cs531-cs_cbrad022:80
> 
> GET /a5-test/limited3/foobar.txt HTTP/1.1
> User-Agent: CS531 Assignment 5 Tester/1670270784
> Authorization: Basic YmRhOmJkYQ==
> Host: cs531-cs_cbrad022:80
> Connection: close
> 

< HTTP/1.1 200 OK
< Date: Mon, 05 Dec 2022 08:06:24 GMT
< Server: calebsserver
< Content-Type: text/html
< Transfer-Encoding: chunked
< Connection: close
< 
< HTTP/1.1 200 OK
< Date: Mon, 05 Dec 2022 08:06:24 GMT
< Server: calebsserver
< Content-Type: text/html
< Transfer-Encoding: chunked
< Connection: close
< 
* [Payload redacted (277 bytes)]

--------------------------------------------------------------------------------
test_pipeline_auth_put_get: Test whether pipelined PUT and GET requests are auth protected (Note: some request headers maight be separated by LF instead of CRLF)
* Connecting to the `cs531-cs_cbrad022:80` server
* Request data sent
* Response data read
* Response parsed
[FAILED] ASSERTION: Status expected `401`, returned `405`

> PUT /a5-test/limited2/test.txt HTTP/1.1
> User-Agent: CS531 Assignment 5 Tester/1670270784
> Authorization: Basic YmRhOmJkYQ==
> Host: cs531-cs_cbrad022:80
> Content-Type: text/plain
> Content-Length: 63
> 
> here comes a PUT method
> 
> in text/plain format
> 
> hooray for PUT!
> GET /a5-test/limited3/foobar.txt HTTP/1.1
> User-Agent: CS531 Assignment 5 Tester/1670270784
> Authorization: Basic alsdkfjlasjd
> Host: cs531-cs_cbrad022:80
> Connection: close
> 

< HTTP/1.1 405 Method Not Allowed
< Date: Mon, 05 Dec 2022 08:06:24 GMT
< Server: calebsserver
< Allow: GET, HEAD, TRACE, OPTIONS, POST
< Content-Type: text/html
< Transfer-Encoding: chunked
< Connection: close
< 
* [Payload redacted (54 bytes)]

--------------------------------------------------------------------------------
test_auth_get_delete: Test whether a file that was PUT in an earlier test is auth protected, returns 200 OK on GET, and can be deleted successfully
* Connecting to the `cs531-cs_cbrad022:80` server
* Request data sent
* Response data read
[FAILED] Empty response

> GET http://cs531-cs_cbrad022/a5-test/limited4/foo/barbar.txt HTTP/1.1
> Host: cs531-cs_cbrad022
> Connection: close
> 

--------------------------------------------------------------------------------
test_cgi_env_query_str: Test whether CGI script can see and report environment variables like QUERY_STRING and HTTP_USER_AGENT
* Connecting to the `cs531-cs_cbrad022:80` server
* Request data sent
* Response data read
[FAILED] Empty response

> GET /a5-test/env.cgi?var1=foo&var2=bar HTTP/1.1
> Host: cs531-cs_cbrad022:80
> User-Agent: CS531 Assignment 5 Tester/1670270784
> Connection: close
> 

--------------------------------------------------------------------------------
test_cgi_protected_auth_basic: Test whether CGI script is protected with HTTP Basic auth
* Connecting to the `cs531-cs_cbrad022:80` server
* Request data sent
* Response data read
[FAILED] Empty response

> GET /a5-test/limited3/env.cgi?var1=foo&var2=bar HTTP/1.1
> Host: cs531-cs_cbrad022
> Connection: close
> 

--------------------------------------------------------------------------------
test_post_www_urlencoded: Test whether CGI script reads and echoes back URL-encoded POST data
* Connecting to the `cs531-cs_cbrad022:80` server
* Request data sent
* Response data read
[FAILED] Empty response

> POST /a5-test/limited3/env.cgi HTTP/1.1
> Host: cs531-cs_cbrad022:80
> Authorization: Basic YmRhOmJkYQ==
> Connection: close
> Content-Type: application/x-form-www-urlencoded
> Content-Length: 18
> 
> var1=foo&var2=bar

--------------------------------------------------------------------------------
test_post_www_multipart: Test whether CGI script reads and echoes back multipart POST data
* Connecting to the `cs531-cs_cbrad022:80` server
* Request data sent
* Response data read
[FAILED] Empty response

> POST /a5-test/limited3/env.cgi HTTP/1.1
> Host: cs531-cs_cbrad022:80
> Authorization: Basic YmRhOmJkYQ==
> Connection: close
> Content-Type: multipart/form-data; boundary=---------------------------4739460061587540926829627201
> Content-Length: 295
> 
> -----------------------------4739460061587540926829627201
> Content-Disposition: form-data; name="userinput"
> 
> test 1 2 3
> -----------------------------4739460061587540926829627201
> Content-Disposition: form-data; name="domain"
> 
> cs.odu.edu
> -----------------------------4739460061587540926829627201--

=================================== SUMMARY ====================================
Server: cs531-cs_cbrad022:80
Test Case Results:
FAILED: test_protected_options_trace_full_method_support
FAILED: test_multiple_cgi_scripts
FAILED: test_cgi_auth_internal_error
PASSED: test_allow_no_put_delete
PASSED: test_delete_not_allowed
PASSED: test_put_not_allowed
FAILED: test_put_success_auth_digest
PASSED: test_put_success_auth_basic
PASSED: test_auth_created_files
FAILED: test_delete_verify
FAILED: test_pipeline_auth_put_get
FAILED: test_auth_get_delete
FAILED: test_cgi_env_query_str
FAILED: test_cgi_protected_auth_basic
FAILED: test_post_www_urlencoded
FAILED: test_post_www_multipart
--------------------------------------------------------------------------------
TOTAL: 16, PASSED: 5, FAILED: 11
===============================================================================

Destroying server: cs531-cs_cbrad022
Server `cs531-cs_cbrad022` destroyed successfully.
ibnesayeed commented 1 year ago
================================================================================
Assignment: cs531a4
Student: Caleb Bradford <cs_cbrad022@cs.odu.edu>
Time: 20221205-200518 UTC
Repository: https://github.com/calebkbrad/calebsserver/tree/a5
Server: cs531-cs_cbrad022
================================================================================

Deploying server: cs531-cs_cbrad022

Cloning the `https://github.com/calebkbrad/calebsserver.git` repo and checking the `a5` branch/tag out
Released at: 2022-11-30T04:56:07Z
Step 1/13 : FROM    python:3
 ---> e285995a3494
Step 2/13 : LABEL   maintainer = "Caleb Bradford <@calebkbradford>"
 ---> Using cache
 ---> 74579e05b181
Step 3/13 : ENV WEBROOT="/var/www"
 ---> Using cache
 ---> d2ddd397f43b
Step 4/13 : WORKDIR ${WEBROOT}
 ---> Using cache
 ---> 5d9b75cadc40
Step 5/13 : RUN     wget https://raw.githubusercontent.com/ibnesayeed/webserver-tester/master/sample/cs531-test-files.tar.gz         && tar xvzf cs531-test-files.tar.gz         && rm -rf cs531-test-files.tar.gz
 ---> Using cache
 ---> fd41172e0a28
Step 6/13 : WORKDIR /app
 ---> Using cache
 ---> 635268e75bbc
Step 7/13 : COPY    src/server.py /app
 ---> Using cache
 ---> 73bd9617484c
Step 8/13 : COPY    errorpages /app/errorpages
 ---> Using cache
 ---> 07a23b381938
Step 9/13 : COPY    settings /app/settings
 ---> Using cache
 ---> 392c70a435b4
Step 10/13 : RUN     touch /app/access.log
 ---> Using cache
 ---> caa19c100c79
Step 11/13 : RUN     chmod a+x server.py
 ---> Using cache
 ---> 05066e490079
Step 12/13 : RUN     pip install pyyaml
 ---> Using cache
 ---> 7685082e6e5d
Step 13/13 : ENTRYPOINT [ "./server.py" ]
 ---> Using cache
 ---> e61518d251ba
Successfully built e61518d251ba
Successfully tagged cs531/cs_cbrad022:a5

A new container is created and the server `cs531-cs_cbrad022` is deployed successfully

Testing server: cs531-cs_cbrad022 against cs531a4 test suite

Testing cs531-cs_cbrad022:80
--------------------------------------------------------------------------------
test_basic_auth_realm: Test whether files are protected with HTTP Basic auth and return configured realm
* Connecting to the `cs531-cs_cbrad022:80` server
* Request data sent
* Response data read
* Response parsed
* Status is `401`
* `WWW-Authenticate` header is present
* `WWW-Authenticate` header has value `Basic realm="Fried Twice"`
[PASSED]

> GET http://cs531-cs_cbrad022/a4-test/limited1/protected HTTP/1.1
> Host: cs531-cs_cbrad022:80
> User-Agent: CS531 Assignment 4 Tester/1670270724
> Connection: close
> 

< HTTP/1.1 401 Unauthorized
< Date: Mon, 05 Dec 2022 08:05:24 GMT
< Server: calebsserver
< Transfer-Encoding: chunked
< WWW-Authenticate: Basic realm="Fried Twice"
< Content-Type: text/html
< 
* [Payload redacted (65 bytes)]

--------------------------------------------------------------------------------
test_basic_wrong_auth_unauthorized: Test whether access is unauthorized with wrong Authorization header
* Connecting to the `cs531-cs_cbrad022:80` server
* Request data sent
* Response data read
* Response parsed
* Status is `401`
* `WWW-Authenticate` header is present
* `WWW-Authenticate` header has value `Basic realm="Fried Twice"`
[PASSED]

> GET http://cs531-cs_cbrad022/a4-test/limited1/protected HTTP/1.1
> Host: cs531-cs_cbrad022:80
> User-Agent: CS531 Assignment 4 Tester/1670270724
> Authorization: Basic YmRhOm1sbg==
> Connection: close
> 

< HTTP/1.1 401 Unauthorized
< Date: Mon, 05 Dec 2022 08:05:24 GMT
< Server: calebsserver
< Transfer-Encoding: chunked
< WWW-Authenticate: Basic realm="Fried Twice"
< Content-Type: text/html
< 
* [Payload redacted (65 bytes)]

--------------------------------------------------------------------------------
test_nested_basic_auth: Test whether files in nested directories are protected with HTTP Basic auth
* Connecting to the `cs531-cs_cbrad022:80` server
* Request data sent
* Response data read
* Response parsed
* Status is `401`
* `WWW-Authenticate` header is present
* `WWW-Authenticate` header has value `Basic realm="Fried Twice"`
[PASSED]

> GET http://cs531-cs_cbrad022/a4-test/limited1/1/protected2 HTTP/1.1
> Host: cs531-cs_cbrad022:80
> User-Agent: CS531 Assignment 4 Tester/1670270724
> Connection: close
> 

< HTTP/1.1 401 Unauthorized
< Date: Mon, 05 Dec 2022 08:05:24 GMT
< Server: calebsserver
< Transfer-Encoding: chunked
< WWW-Authenticate: Basic realm="Fried Twice"
< Content-Type: text/html
< 
* [Payload redacted (65 bytes)]

--------------------------------------------------------------------------------
test_basic_auth_ok: Test whether access is granted with valid Authorization header
* Connecting to the `cs531-cs_cbrad022:80` server
* Request data sent
* Response data read
* Response parsed
* Status is `200`
* `Content-Type` header is present
* `Content-Type` header begins with `application/octet-stream`
* `Content-Length` header is present
* `Content-Length` header has value `24`
* Payload contains `this file is protected`
[PASSED]

> GET http://cs531-cs_cbrad022/a4-test/limited1/protected HTTP/1.1
> Host: cs531-cs_cbrad022:80
> User-Agent: CS531 Assignment 4 Tester/1670270724
> Referer: http://cs531-cs_cbrad022/a4-test/index.html
> Authorization: Basic bWxuOm1sbg==
> Connection: close
> 

< HTTP/1.1 200 OK
< Date: Mon, 05 Dec 2022 08:05:24 GMT
< Server: calebsserver
< Content-Type: application/octet-stream
< Last-Modified: Tue, 10 Jan 2012 12:02:44 GMT
< Content-Length: 24
< ETag: "8ed899d84c0b40379d76da3fa7f7670b"
< 
* [Payload redacted (24 bytes)]

--------------------------------------------------------------------------------
test_nested_basic_auth_ok: Test whether access is granted with valid Authorization header in nested directories
* Connecting to the `cs531-cs_cbrad022:80` server
* Request data sent
* Response data read
* Response parsed
* Status is `200`
* `Content-Type` header is present
* `Content-Type` header begins with `application/octet-stream`
* `Content-Length` header is present
* `Content-Length` header has value `29`
* Payload contains `this file is protected too!`
[PASSED]

> GET http://cs531-cs_cbrad022/a4-test/limited1/1/protected2 HTTP/1.1
> Host: cs531-cs_cbrad022:80
> User-Agent: CS531 Assignment 4 Tester/1670270724
> Authorization: Basic YmRhOmJkYQ==
> Connection: close
> 

< HTTP/1.1 200 OK
< Date: Mon, 05 Dec 2022 08:05:24 GMT
< Server: calebsserver
< Content-Type: application/octet-stream
< Last-Modified: Tue, 10 Jan 2012 12:02:44 GMT
< Content-Length: 29
< ETag: "a273c13b965967fa99646f6cde0f0ef2"
< 
* [Payload redacted (29 bytes)]

--------------------------------------------------------------------------------
test_double_auth_bad: Test whether two Authorization headers report a bad request
* Connecting to the `cs531-cs_cbrad022:80` server
* Request data sent
* Response data read
* Response parsed
* Status is `400`
* `Content-Type` header is present
* `Content-Type` header begins with `text/html`
* `Transfer-Encoding` header is present
* `Transfer-Encoding` header has value `chunked`
* Payload is not empty
[PASSED]

> GET http://cs531-cs_cbrad022/a4-test/limited1/protected HTTP/1.1
> Host: cs531-cs_cbrad022:80
> User-Agent: CS531 Assignment 4 Tester/1670270724
> Authorization: Basic YmRhOmJkYQ==
> Authorization: Basic ZZRhOmJkYQ==
> Connection: close
> 

< HTTP/1.1 400 Bad Request
< Date: Mon, 05 Dec 2022 08:05:24 GMT
< Server: calebsserver
< Content-Type: text/html
< Transfer-Encoding: chunked
< Connection: close
< 
* [Payload redacted (81 bytes)]

--------------------------------------------------------------------------------
test_nested_digest_auth: Test whether files in nested directories are protected with HTTP Digest auth
* Connecting to the `cs531-cs_cbrad022:80` server
* Request data sent
* Response data read
* Response parsed
* Status is `401`
* `WWW-Authenticate` header is present
* `WWW-Authenticate` header begins with `Digest`
[PASSED]

> GET http://cs531-cs_cbrad022/a4-test/limited2/foo/bar.txt HTTP/1.1
> Host: cs531-cs_cbrad022:80
> User-Agent: CS531 Assignment 4 Tester/1670270724
> Connection: close
> 

< HTTP/1.1 401 Unauthorized
< Date: Mon, 05 Dec 2022 08:05:24 GMT
< Server: calebsserver
< Transfer-Encoding: chunked
< WWW-Authenticate: Digest realm="Colonial Place", domain="/a4-test/limited2/foo/bar.txt", qop="auth", nonce="RGF0ZTogTW9uLCAwNSBEZWMgMjAyMiAwODowNToyNCBHTVQNCiA1Y2EyZWU4MWVkZDNiODIxNGEwYWUwOWU2MjZmMWI4MA==", algorithm="MD5", opaque="86aec6c17b26b90e025922fa49faf4ae"
< Content-Type: text/html
< 
* [Payload redacted (65 bytes)]

--------------------------------------------------------------------------------
test_head_nested_digest_auth: Test whether HEAD method in nested directories is protected with HTTP Digest auth
* Connecting to the `cs531-cs_cbrad022:80` server
* Request data sent
* Response data read
* Response parsed
* Status is `401`
* `WWW-Authenticate` header is present
* `WWW-Authenticate` header begins with `Digest`
[PASSED]

> HEAD http://cs531-cs_cbrad022/a4-test/limited2/foo/bar.txt HTTP/1.1
> Host: cs531-cs_cbrad022:80
> User-Agent: CS531 Assignment 4 Tester/1670270724
> Connection: close
> 

< HTTP/1.1 401 Unauthorized
< Date: Mon, 05 Dec 2022 08:05:24 GMT
< Server: calebsserver
< Transfer-Encoding: chunked
< WWW-Authenticate: Digest realm="Colonial Place", domain="/a4-test/limited2/foo/bar.txt", qop="auth", nonce="RGF0ZTogTW9uLCAwNSBEZWMgMjAyMiAwODowNToyNCBHTVQNCiA1Y2EyZWU4MWVkZDNiODIxNGEwYWUwOWU2MjZmMWI4MA==", algorithm="MD5", opaque="86aec6c17b26b90e025922fa49faf4ae"
< Content-Type: text/html

--------------------------------------------------------------------------------
test_options_nested_digest_auth: Test whether OPTIONS method in nested directories is protected with HTTP Digest auth
* Connecting to the `cs531-cs_cbrad022:80` server
* Request data sent
* Response data read
* Response parsed
* Status is `401`
* `WWW-Authenticate` header is present
* `WWW-Authenticate` header begins with `Digest`
[PASSED]

> OPTIONS http://cs531-cs_cbrad022/a4-test/limited2/foo/bar.txt HTTP/1.1
> Host: cs531-cs_cbrad022:80
> User-Agent: CS531 Assignment 4 Tester/1670270724
> Connection: close
> 

< HTTP/1.1 401 Unauthorized
< Date: Mon, 05 Dec 2022 08:05:24 GMT
< Server: calebsserver
< Transfer-Encoding: chunked
< WWW-Authenticate: Digest realm="Colonial Place", domain="/a4-test/limited2/foo/bar.txt", qop="auth", nonce="RGF0ZTogTW9uLCAwNSBEZWMgMjAyMiAwODowNToyNCBHTVQNCiA1Y2EyZWU4MWVkZDNiODIxNGEwYWUwOWU2MjZmMWI4MA==", algorithm="MD5", opaque="86aec6c17b26b90e025922fa49faf4ae"
< Content-Type: text/html

--------------------------------------------------------------------------------
test_wrong_realm_unauthorized: Test whether an incorrect realm prevents authorization
* Connecting to the `cs531-cs_cbrad022:80` server
* Request data sent
* Response data read
* Response parsed
* Status is `401`
* `WWW-Authenticate` header is present
* `WWW-Authenticate` header begins with `Digest`
[PASSED]

> GET http://cs531-cs_cbrad022/a4-test/limited2/foo/bar.txt HTTP/1.1
> Host: cs531-cs_cbrad022:80
> Authorization: Digest username="mln", realm="ColonialPlace", uri="http://cs531-cs_cbrad022/a4-test/limited2/foo/bar.txt", qop=auth, nonce="RGF0ZTogTW9uLCAwNSBEZWMgMjAyMiAwODowNToyNCBHTVQNCiA1Y2EyZWU4MWVkZDNiODIxNGEwYWUwOWU2MjZmMWI4MA", nc=00000001, cnonce="014a54548c61ba03827ef6a4dc2f7b4c", response="73099f99acd2283d604081ccef00b172"
> Connection: close
> 

< HTTP/1.1 401 Unauthorized
< Date: Mon, 05 Dec 2022 08:05:24 GMT
< Server: calebsserver
< Transfer-Encoding: chunked
< WWW-Authenticate: Digest realm="Colonial Place", domain="/a4-test/limited2/foo/bar.txt", qop="auth", nonce="RGF0ZTogTW9uLCAwNSBEZWMgMjAyMiAwODowNToyNCBHTVQNCiA1Y2EyZWU4MWVkZDNiODIxNGEwYWUwOWU2MjZmMWI4MA==", algorithm="MD5", opaque="86aec6c17b26b90e025922fa49faf4ae"
< Content-Type: text/html
< 
* [Payload redacted (65 bytes)]

--------------------------------------------------------------------------------
test_wrong_ncount_unauthorized: Test whether an incorrect nonce count prevents authorization
* Connecting to the `cs531-cs_cbrad022:80` server
* Request data sent
* Response data read
* Response parsed
* Status is `401`
* `WWW-Authenticate` header is present
* `WWW-Authenticate` header begins with `Digest`
[PASSED]

> GET http://cs531-cs_cbrad022/a4-test/limited2/foo/bar.txt HTTP/1.1
> Host: cs531-cs_cbrad022:80
> Authorization: Digest username="mln", realm="Colonial Place", uri="http://cs531-cs_cbrad022/a4-test/limited2/foo/bar.txt", qop=auth, nonce="RGF0ZTogTW9uLCAwNSBEZWMgMjAyMiAwODowNToyNCBHTVQNCiA1Y2EyZWU4MWVkZDNiODIxNGEwYWUwOWU2MjZmMWI4MA", nc=00000002, cnonce="014a54548c61ba03827ef6a4dc2f7b4c", response="73099f99acd2283d604081ccef00b172"
> Connection: close
> 

< HTTP/1.1 401 Unauthorized
< Date: Mon, 05 Dec 2022 08:05:24 GMT
< Server: calebsserver
< Transfer-Encoding: chunked
< WWW-Authenticate: Digest realm="Colonial Place", domain="/a4-test/limited2/foo/bar.txt", qop="auth", nonce="RGF0ZTogTW9uLCAwNSBEZWMgMjAyMiAwODowNToyNCBHTVQNCiA1Y2EyZWU4MWVkZDNiODIxNGEwYWUwOWU2MjZmMWI4MA==", algorithm="MD5", opaque="86aec6c17b26b90e025922fa49faf4ae"
< Content-Type: text/html
< 
* [Payload redacted (65 bytes)]

--------------------------------------------------------------------------------
test_wrong_digest_response_unauthorized: Test whether an incorrect digest response prevents authorization
* Connecting to the `cs531-cs_cbrad022:80` server
* Request data sent
* Response data read
* Response parsed
* Status is `401`
* `WWW-Authenticate` header is present
* `WWW-Authenticate` header begins with `Digest`
[PASSED]

> GET http://cs531-cs_cbrad022/a4-test/limited2/foo/bar.txt HTTP/1.1
> Host: cs531-cs_cbrad022:80
> Authorization: Digest username="mln", realm="Colonial Place", uri="http://cs531-cs_cbrad022/a4-test/limited2/foo/bar.txt", qop=auth, nonce="RGF0ZTogTW9uLCAwNSBEZWMgMjAyMiAwODowNToyNCBHTVQNCiA1Y2EyZWU4MWVkZDNiODIxNGEwYWUwOWU2MjZmMWI4MA", nc=00000001, cnonce="014a54548c61ba03827ef6a4dc2f7b4c", response="ab8a8c8ade17dbaa8a9dd81334382224"
> Connection: close
> 

< HTTP/1.1 401 Unauthorized
< Date: Mon, 05 Dec 2022 08:05:24 GMT
< Server: calebsserver
< Transfer-Encoding: chunked
< WWW-Authenticate: Digest realm="Colonial Place", domain="/a4-test/limited2/foo/bar.txt", qop="auth", nonce="RGF0ZTogTW9uLCAwNSBEZWMgMjAyMiAwODowNToyNCBHTVQNCiA1Y2EyZWU4MWVkZDNiODIxNGEwYWUwOWU2MjZmMWI4MA==", algorithm="MD5", opaque="86aec6c17b26b90e025922fa49faf4ae"
< Content-Type: text/html
< 
* [Payload redacted (65 bytes)]

--------------------------------------------------------------------------------
test_wrong_digest_user_unauthorized: Test whether an incorrect digest user prevents authorization
* Connecting to the `cs531-cs_cbrad022:80` server
* Request data sent
* Response data read
* Response parsed
* Status is `401`
* `WWW-Authenticate` header is present
* `WWW-Authenticate` header begins with `Digest`
[PASSED]

> GET http://cs531-cs_cbrad022/a4-test/limited2/foo/bar.txt HTTP/1.1
> Host: cs531-cs_cbrad022:80
> Authorization: Digest username="bda", realm="Colonial Place", uri="http://cs531-cs_cbrad022/a4-test/limited2/foo/bar.txt", qop=auth, nonce="RGF0ZTogTW9uLCAwNSBEZWMgMjAyMiAwODowNToyNCBHTVQNCiA1Y2EyZWU4MWVkZDNiODIxNGEwYWUwOWU2MjZmMWI4MA", nc=00000002, cnonce="014a54548c61ba03827ef6a4dc2f7b4c", response="ab8a8c8ade17dbaa8a9dd81334382224"
> Connection: close
> 

< HTTP/1.1 401 Unauthorized
< Date: Mon, 05 Dec 2022 08:05:24 GMT
< Server: calebsserver
< Transfer-Encoding: chunked
< WWW-Authenticate: Digest realm="Colonial Place", domain="/a4-test/limited2/foo/bar.txt", qop="auth", nonce="RGF0ZTogTW9uLCAwNSBEZWMgMjAyMiAwODowNToyNCBHTVQNCiA1Y2EyZWU4MWVkZDNiODIxNGEwYWUwOWU2MjZmMWI4MA==", algorithm="MD5", opaque="86aec6c17b26b90e025922fa49faf4ae"
< Content-Type: text/html
< 
* [Payload redacted (65 bytes)]

--------------------------------------------------------------------------------
test_correct_realm_authorized: Test whether a correct realm with other values grants authorization
* Connecting to the `cs531-cs_cbrad022:80` server
* Request data sent
* Response data read
* Response parsed
[FAILED] ASSERTION: Status expected `200`, returned `401`

> GET http://cs531-cs_cbrad022/a4-test/limited2/foo/bar.txt HTTP/1.1
> Host: cs531-cs_cbrad022:80
> Authorization: Digest username="mln", realm="Colonial Place", uri="http://cs531-cs_cbrad022/a4-test/limited2/foo/bar.txt", qop=auth, nonce="RGF0ZTogTW9uLCAwNSBEZWMgMjAyMiAwODowNToyNCBHTVQNCiA1Y2EyZWU4MWVkZDNiODIxNGEwYWUwOWU2MjZmMWI4MA", nc=00000001, cnonce="014a54548c61ba03827ef6a4dc2f7b4c", response="73099f99acd2283d604081ccef00b172"
> Connection: close
> 

< HTTP/1.1 401 Unauthorized
< Date: Mon, 05 Dec 2022 08:05:24 GMT
< Server: calebsserver
< Transfer-Encoding: chunked
< WWW-Authenticate: Digest realm="Colonial Place", domain="/a4-test/limited2/foo/bar.txt", qop="auth", nonce="RGF0ZTogTW9uLCAwNSBEZWMgMjAyMiAwODowNToyNCBHTVQNCiA1Y2EyZWU4MWVkZDNiODIxNGEwYWUwOWU2MjZmMWI4MA==", algorithm="MD5", opaque="86aec6c17b26b90e025922fa49faf4ae"
< Content-Type: text/html
< 
* [Payload redacted (65 bytes)]

--------------------------------------------------------------------------------
test_auth_over_conditional_get: Test whether authorization is ensured before conditional GET precondition check
* Connecting to the `cs531-cs_cbrad022:80` server
* Request data sent
* Response data read
* Response parsed
* Status is `401`
* `WWW-Authenticate` header is present
* `WWW-Authenticate` header begins with `Digest`
[PASSED]

> GET /a4-test/limited2/foo/bar.txt HTTP/1.1
> Host: cs531-cs_cbrad022
> If-Match: "x248kjaldsf00000000002"
> Connection: close
> 

< HTTP/1.1 401 Unauthorized
< Date: Mon, 05 Dec 2022 08:05:24 GMT
< Server: calebsserver
< Transfer-Encoding: chunked
< WWW-Authenticate: Digest realm="Colonial Place", domain="/a4-test/limited2/foo/bar.txt", qop="auth", nonce="RGF0ZTogTW9uLCAwNSBEZWMgMjAyMiAwODowNToyNCBHTVQNCiA1Y2EyZWU4MWVkZDNiODIxNGEwYWUwOWU2MjZmMWI4MA==", algorithm="MD5", opaque="86aec6c17b26b90e025922fa49faf4ae"
< Content-Type: text/html
< 
* [Payload redacted (65 bytes)]

--------------------------------------------------------------------------------
test_large_range_not_satisfiable: Test whether a Range larger than the file returns 416 Range Not Satisfiable
* Connecting to the `cs531-cs_cbrad022:80` server
* Request data sent
* Response data read
* Response parsed
[FAILED] ASSERTION: Status expected `416`, returned `206`

> HEAD /a4-test/index.html.ru.koi8-r HTTP/1.1
> Host: cs531-cs_cbrad022:80
> Range: bytes=20000-29999
> Connection: close
> 

< HTTP/1.1 206 Partial Content
< Content-Range: bytes 20000-29999/7277
< Date: Mon, 05 Dec 2022 08:05:24 GMT
< Server: calebsserver
< Content-Type: text/html; charset=koi8-r
< Content-Language: ru
< Last-Modified: Tue, 10 Jan 2012 12:02:44 GMT
< Content-Length: 7277
< ETag: "a4fb640ff753fbdeb23ddc7cf605dd0d"

--------------------------------------------------------------------------------
test_pipeline_auth: Test whether authorization is respected in pipeline requests
* Connecting to the `cs531-cs_cbrad022:80` server
* Request data sent
* Response data read
* Response parsed
[FAILED] ASSERTION: Status expected `416`, returned `206`

> HEAD http://cs531-cs_cbrad022/a4-test/limited1/protected HTTP/1.1
> Range: bytes=20000-29999
> User-Agent: CS531 Assignment 4 Tester/1670270724
> Authorization: Basic YmRhOmJkYQ==
> Host: cs531-cs_cbrad022:80
> 
> HEAD http://cs531-cs_cbrad022/a4-test/index.html.de HTTP/1.1
> Host: cs531-cs_cbrad022:80
> 
> HEAD http://cs531-cs_cbrad022/a4-test/limited1/protected HTTP/1.1
> Host: cs531-cs_cbrad022:80
> User-Agent: CS531 Assignment 4 Tester/1670270724
> Authorization: Basic YmRhOmJkYQxx
> 
> HEAD http://cs531-cs_cbrad022/a4-test/index.html.en HTTP/1.1
> Host: cs531-cs_cbrad022:80
> 
> HEAD http://cs531-cs_cbrad022/a4-test/index.html.ja.jis HTTP/1.1
> Host: cs531-cs_cbrad022:80
> Connection: close
> 

< HTTP/1.1 206 Partial Content
< Content-Range: bytes 20000-29999/24
< Date: Mon, 05 Dec 2022 08:05:24 GMT
< Server: calebsserver
< Content-Type: application/octet-stream
< Last-Modified: Tue, 10 Jan 2012 12:02:44 GMT
< Content-Length: 24
< ETag: "8ed899d84c0b40379d76da3fa7f7670b"
< 
* [Payload redacted (912 bytes)]

=================================== SUMMARY ====================================
Server: cs531-cs_cbrad022:80
Test Case Results:
PASSED: test_basic_auth_realm
PASSED: test_basic_wrong_auth_unauthorized
PASSED: test_nested_basic_auth
PASSED: test_basic_auth_ok
PASSED: test_nested_basic_auth_ok
PASSED: test_double_auth_bad
PASSED: test_nested_digest_auth
PASSED: test_head_nested_digest_auth
PASSED: test_options_nested_digest_auth
PASSED: test_wrong_realm_unauthorized
PASSED: test_wrong_ncount_unauthorized
PASSED: test_wrong_digest_response_unauthorized
PASSED: test_wrong_digest_user_unauthorized
FAILED: test_correct_realm_authorized
PASSED: test_auth_over_conditional_get
FAILED: test_large_range_not_satisfiable
FAILED: test_pipeline_auth
--------------------------------------------------------------------------------
TOTAL: 17, PASSED: 14, FAILED: 3
===============================================================================

Destroying server: cs531-cs_cbrad022
Server `cs531-cs_cbrad022` destroyed successfully.
ibnesayeed commented 1 year ago
================================================================================
Assignment: cs531a3
Student: Caleb Bradford <cs_cbrad022@cs.odu.edu>
Time: 20221205-200253 UTC
Repository: https://github.com/calebkbrad/calebsserver/tree/a5
Server: cs531-cs_cbrad022
================================================================================

Deploying server: cs531-cs_cbrad022

Cloning the `https://github.com/calebkbrad/calebsserver.git` repo and checking the `a5` branch/tag out
Released at: 2022-11-30T04:56:07Z
Step 1/13 : FROM    python:3
 ---> e285995a3494
Step 2/13 : LABEL   maintainer = "Caleb Bradford <@calebkbradford>"
 ---> Using cache
 ---> 74579e05b181
Step 3/13 : ENV WEBROOT="/var/www"
 ---> Using cache
 ---> d2ddd397f43b
Step 4/13 : WORKDIR ${WEBROOT}
 ---> Using cache
 ---> 5d9b75cadc40
Step 5/13 : RUN     wget https://raw.githubusercontent.com/ibnesayeed/webserver-tester/master/sample/cs531-test-files.tar.gz         && tar xvzf cs531-test-files.tar.gz         && rm -rf cs531-test-files.tar.gz
 ---> Using cache
 ---> fd41172e0a28
Step 6/13 : WORKDIR /app
 ---> Using cache
 ---> 635268e75bbc
Step 7/13 : COPY    src/server.py /app
 ---> Using cache
 ---> 73bd9617484c
Step 8/13 : COPY    errorpages /app/errorpages
 ---> Using cache
 ---> 07a23b381938
Step 9/13 : COPY    settings /app/settings
 ---> Using cache
 ---> 392c70a435b4
Step 10/13 : RUN     touch /app/access.log
 ---> Using cache
 ---> caa19c100c79
Step 11/13 : RUN     chmod a+x server.py
 ---> Using cache
 ---> 05066e490079
Step 12/13 : RUN     pip install pyyaml
 ---> Using cache
 ---> 7685082e6e5d
Step 13/13 : ENTRYPOINT [ "./server.py" ]
 ---> Using cache
 ---> e61518d251ba
Successfully built e61518d251ba
Successfully tagged cs531/cs_cbrad022:a5

A new container is created and the server `cs531-cs_cbrad022` is deployed successfully

Testing server: cs531-cs_cbrad022 against cs531a3 test suite

Testing cs531-cs_cbrad022:80
--------------------------------------------------------------------------------
test_useragent_get_text_ok: Test whether a request with a custom user-agent returns OK with corresponding text response
* Connecting to the `cs531-cs_cbrad022:80` server
* Request data sent
* Response data read
* Response parsed
* Status is `200`
* `Content-Type` header is present
* `Content-Type` header begins with `text/plain`
* `Content-Length` header is present
* `Content-Length` header has value `193`
* Payload contains `______________`
[PASSED]

> GET http://cs531-cs_cbrad022/a3-test/fairlane.txt HTTP/1.1
> Host: cs531-cs_cbrad022:80
> User-Agent: CS531 Assignment 3 Tester/1670270579
> Connection: close
> 

< HTTP/1.1 200 OK
< Date: Mon, 05 Dec 2022 08:02:59 GMT
< Server: calebsserver
< Content-Type: text/plain
< Last-Modified: Sat, 03 Nov 2018 02:10:11 GMT
< Content-Length: 193
< ETag: "55d0c79f6feaf06fa2a2dbca5b62efad"
< 
* [Payload redacted (193 bytes)]

--------------------------------------------------------------------------------
test_partial_content_range_language: Test whether a valid range request header returns partial content in a specific langaue
* Connecting to the `cs531-cs_cbrad022:80` server
* Request data sent
* Response data read
* Response parsed
* Status is `206`
* `Content-Type` header is present
* `Content-Type` header begins with `text/html`
* `Content-Language` header is present
* `Content-Language` header has value `es`
* `Content-Range` header is present
* `Content-Length` header is present
* `Content-Length` header has value `100`
* Payload size is `100` bytes
[PASSED]

> GET http://cs531-cs_cbrad022/a3-test/index.html.es HTTP/1.1
> Host: cs531-cs_cbrad022:80
> User-Agent: CS531 Assignment 3 Tester/1670270579
> Referer: http://cs531-cs_cbrad022/a3-test/index.html
> Range: bytes=0-99
> Connection: close
> 

< HTTP/1.1 206 Partial Content
< Content-Range: bytes 0-99/7643
< Date: Mon, 05 Dec 2022 08:02:59 GMT
< Server: calebsserver
< Content-Type: text/html
< Content-Language: es
< Last-Modified: Sat, 03 Nov 2018 02:10:11 GMT
< Content-Length: 100
< ETag: "c4ea947cd06b0602bb4d168b18fb36cf"
< 
* [Payload redacted (100 bytes)]

--------------------------------------------------------------------------------
test_chunked_404: Test whether a 404 Not Found page returns chunked encoded HTML
* Connecting to the `cs531-cs_cbrad022:80` server
* Request data sent
* Response data read
* Response parsed
* Status is `404`
* `Content-Type` header is present
* `Content-Type` header begins with `text/html`
* `Transfer-Encoding` header is present
* `Transfer-Encoding` header has value `chunked`
* Payload is not empty
[PASSED]

> GET /a3-test/index.htmll HTTP/1.1
> Host: cs531-cs_cbrad022:80
> User-Agent: CS531 Assignment 3 Tester/1670270579
> Connection: close
> 

< HTTP/1.1 404 Not Found
< Date: Mon, 05 Dec 2022 08:02:59 GMT
< Server: calebsserver
< Content-Type: text/html
< Transfer-Encoding: chunked
< Connection: close
< 
* [Payload redacted (66 bytes)]

--------------------------------------------------------------------------------
test_conditional_head_image_fresh: Test whether conditional HEAD of a fresh image file returns 304 Not Modified
* Connecting to the `cs531-cs_cbrad022:80` server
* Request data sent
* Response data read
* Response parsed
[FAILED] ASSERTION: Status expected `304`, returned `200`

> HEAD /a3-test/fairlane.gif HTTP/1.1
> Host: cs531-cs_cbrad022
> If-Modified-Since: Sat, 10 Nov 2018 20:46:11 GMT
> Connection: close
> 

< HTTP/1.1 200 OK
< Date: Mon, 05 Dec 2022 08:02:59 GMT
< Server: calebsserver
< Content-Type: image/gif
< Last-Modified: Sat, 03 Nov 2018 02:10:11 GMT
< Content-Length: 49803
< ETag: "f96f06ec4a14a91969a5476e74d08b94"

--------------------------------------------------------------------------------
test_conditional_head_image_stale: Test whether conditional HEAD of a stale image file returns 200 OK
* Connecting to the `cs531-cs_cbrad022:80` server
* Request data sent
* Response data read
* Response parsed
* Status is `200`
* `Content-Type` header is present
* `Content-Type` header begins with `image/gif`
* Payload is empty
[PASSED]

> HEAD /a3-test/fairlane.gif HTTP/1.1
> Host: cs531-cs_cbrad022
> If-Modified-Since: Sat, 27 Oct 2018 20:46:09 GMT
> Connection: close
> 

< HTTP/1.1 200 OK
< Date: Mon, 05 Dec 2022 08:02:59 GMT
< Server: calebsserver
< Content-Type: image/gif
< Last-Modified: Sat, 03 Nov 2018 02:10:11 GMT
< Content-Length: 49803
< ETag: "f96f06ec4a14a91969a5476e74d08b94"

--------------------------------------------------------------------------------
test_no_accept_header_multiple_choices: Test whether missing Accept header yields multiple choices
* Connecting to the `cs531-cs_cbrad022:80` server
* Request data sent
* Response data read
* Response parsed
* Status is `300`
* `Alternates` header is present
* `Content-Type` header is present
* `Content-Type` header begins with `text/html`
* `Transfer-Encoding` header is present
* `Transfer-Encoding` header has value `chunked`
* Payload is empty
[PASSED]

> HEAD /a3-test/fairlane HTTP/1.1
> Host: cs531-cs_cbrad022
> Connection: close
> 

< HTTP/1.1 300 Multiple Choice
< Date: Mon, 05 Dec 2022 08:02:59 GMT
< Server: calebsserver
< Content-Type: text/html
< Transfer-Encoding: chunked
< Alternates: fairlane.gif fairlane.jpeg fairlane.png fairlane.txt 
< Connection: close

--------------------------------------------------------------------------------
test_ambiguous_accept_header_multiple_choices: Test whether an Accept header with the same qvalue for all image types yields multiple choices
* Connecting to the `cs531-cs_cbrad022:80` server
* Request data sent
* Response data read
* Response parsed
* Status is `300`
* `Alternates` header is present
* `Content-Type` header is present
* `Content-Type` header begins with `text/html`
* `Transfer-Encoding` header is present
* `Transfer-Encoding` header has value `chunked`
* Payload is not empty
[PASSED]

> GET /a3-test/fairlane HTTP/1.1
> Accept: image/*; q=1.0
> Host: cs531-cs_cbrad022:80
> Connection: close
> 

< HTTP/1.1 300 Multiple Choice
< Date: Mon, 05 Dec 2022 08:02:59 GMT
< Server: calebsserver
< Content-Type: text/html
< Transfer-Encoding: chunked
< Alternates: fairlane.gif fairlane.jpeg fairlane.png fairlane.txt 
< Connection: close
< 
* [Payload redacted (67 bytes)]

--------------------------------------------------------------------------------
test_accept_header_png_ok: Test whether an Accept header with unique qvalue returns a PNG
* Connecting to the `cs531-cs_cbrad022:80` server
* Request data sent
* Response data read
* Response parsed
[FAILED] ASSERTION: Status expected `200`, returned `300`

> HEAD /a3-test/fairlane HTTP/1.1
> Host: cs531-cs_cbrad022:80
> Accept: image/jpeg; q=0.9, image/png; q=0.91, image/tiff; q=0.95
> User-Agent: CS531 Assignment 3 Tester/1670270579
> Connection: close
> 

< HTTP/1.1 300 Multiple Choice
< Date: Mon, 05 Dec 2022 08:02:59 GMT
< Server: calebsserver
< Content-Type: text/html
< Transfer-Encoding: chunked
< Alternates: fairlane.gif fairlane.jpeg fairlane.png fairlane.txt 
< Connection: close

--------------------------------------------------------------------------------
test_accept_header_text_ok: Test whether an Accept header with high qvalue returns plain text
* Connecting to the `cs531-cs_cbrad022:80` server
* Request data sent
* Response data read
* Response parsed
[FAILED] ASSERTION: Status expected `200`, returned `300`

> HEAD /a3-test/fairlane HTTP/1.1
> Host: cs531-cs_cbrad022:80
> Accept: text/*; q=1.0, image/*; q=0.99
> User-Agent: CS531 Assignment 3 Tester/1670270579
> Connection: close
> 

< HTTP/1.1 300 Multiple Choice
< Date: Mon, 05 Dec 2022 08:02:59 GMT
< Server: calebsserver
< Content-Type: text/html
< Transfer-Encoding: chunked
< Alternates: fairlane.gif fairlane.jpeg fairlane.png fairlane.txt 
< Connection: close

--------------------------------------------------------------------------------
test_not_accptable_encoding: Test whether explicit zero qvalue for all supported encodings returns 406 Not Acceptable
* Connecting to the `cs531-cs_cbrad022:80` server
* Request data sent
* Response data read
* Response parsed
* Status is `406`
* `Content-Type` header is present
* `Content-Type` header begins with `text/html`
* `Transfer-Encoding` header is present
* `Transfer-Encoding` header has value `chunked`
* Payload is empty
[PASSED]

> HEAD /a3-test/vt-uva.html HTTP/1.1
> Host: cs531-cs_cbrad022:80
> Accept-Encoding: compress; q=0.0, gzip; q=0.0, deflate; q=0.5
> Connection: close
> 

< HTTP/1.1 406 Not Acceptable
< Date: Mon, 05 Dec 2022 08:02:59 GMT
< Server: calebsserver
< Content-Type: text/html
< Transfer-Encoding: chunked
< Connection: close

--------------------------------------------------------------------------------
test_explicit_extention_ignore_content_negotiation: Test whether an explicit existing file extension ignores content negotiation
* Connecting to the `cs531-cs_cbrad022:80` server
* Request data sent
* Response data read
* Response parsed
* Status is `200`
* `Content-Type` header is present
* `Content-Type` header begins with `text/html`
* `Content-Encoding` header is present
* `Content-Encoding` header has value `compress`
* `Content-Length` header is present
* `Content-Length` header has value `42757`
* Payload is empty
[PASSED]

> HEAD /a3-test/vt-uva.html.Z HTTP/1.1
> Host: cs531-cs_cbrad022:80
> Accept-Encoding: compress; q=0.0, gzip; q=0.5
> Connection: close
> 

< HTTP/1.1 200 OK
< Date: Mon, 05 Dec 2022 08:02:59 GMT
< Server: calebsserver
< Content-Type: text/html
< Content-Encoding: compress
< Last-Modified: Sat, 03 Nov 2018 02:22:55 GMT
< Content-Length: 42757
< ETag: "a21cdfa0751d75d43e5a663fbd548b82"

--------------------------------------------------------------------------------
test_ambiguous_accept_language_multiple_choices: Test whether an Accept-Language header with the same qvalue for more than one available languages yields multiple choices
* Connecting to the `cs531-cs_cbrad022:80` server
* Request data sent
* Response data read
* Response parsed
* Status is `300`
* `Alternates` header is present
* `Content-Type` header is present
* `Content-Type` header begins with `text/html`
* `Transfer-Encoding` header is present
* `Transfer-Encoding` header has value `chunked`
* Payload is empty
[PASSED]

> HEAD /a3-test/index.html HTTP/1.1
> Host: cs531-cs_cbrad022:80
> Accept-Language: en; q=1.0, de; q=1.0, fr; q=1.0
> Connection: close
> 

< HTTP/1.1 300 Multiple Choice
< Date: Mon, 05 Dec 2022 08:03:00 GMT
< Server: calebsserver
< Content-Type: text/html
< Transfer-Encoding: chunked
< Alternates: index.html.en index.html.ko.euc-kr index.html.es index.html.ru.koi8-r index.html.de index.html.ja.jis 
< Connection: close

--------------------------------------------------------------------------------
test_not_accptable_incompatiple_charset: Test whether explicit zero qvalue of charset associated with the explicit language extension returns 406 Not Acceptable
* Connecting to the `cs531-cs_cbrad022:80` server
* Request data sent
* Response data read
* Response parsed
* Status is `406`
* `Content-Type` header is present
* `Content-Type` header begins with `text/html`
* `Transfer-Encoding` header is present
* `Transfer-Encoding` header has value `chunked`
* Payload is empty
[PASSED]

> HEAD /a3-test/index.html.ja HTTP/1.1
> Host: cs531-cs_cbrad022:80
> Accept-Language: en; q=1.0, ja; q=0.5
> Accept-Charset: euc-jp; q=1.0, iso-2022-jp; q=0.0
> Connection: close
> 

< HTTP/1.1 406 Not Acceptable
< Date: Mon, 05 Dec 2022 08:03:00 GMT
< Server: calebsserver
< Content-Type: text/html
< Transfer-Encoding: chunked
< Connection: close

--------------------------------------------------------------------------------
test_partial_content_range_text: Test whether a valid range request header returns partial content in plain text
* Connecting to the `cs531-cs_cbrad022:80` server
* Request data sent
* Response data read
* Response parsed
* Status is `206`
* `Content-Type` header is present
* `Content-Type` header begins with `text/plain`
* `Content-Range` header is present
* `Content-Range` header has value `bytes 10-20/193`
* `Content-Length` header is present
* `Content-Length` header has value `11`
* Payload size is `11` bytes
[PASSED]

> GET /a3-test/fairlane.txt HTTP/1.1
> Host: cs531-cs_cbrad022:80
> Range: bytes=10-20
> Connection: close
> 

< HTTP/1.1 206 Partial Content
< Content-Range: bytes 10-20/193
< Date: Mon, 05 Dec 2022 08:03:00 GMT
< Server: calebsserver
< Content-Type: text/plain
< Last-Modified: Sat, 03 Nov 2018 02:10:11 GMT
< Content-Length: 11
< ETag: "55d0c79f6feaf06fa2a2dbca5b62efad"
< 
* [Payload redacted (11 bytes)]

--------------------------------------------------------------------------------
test_etag_precondition_failure: Test whether a random If-Match ETag returns 412 Precondition Failed
* Connecting to the `cs531-cs_cbrad022:80` server
* Request data sent
* Response data read
* Response parsed
* Status is `412`
* `Content-Type` header is present
* `Content-Type` header begins with `text/html`
* `Transfer-Encoding` header is present
* `Transfer-Encoding` header has value `chunked`
* Payload is not empty
[PASSED]

> GET /a3-test/fairlane.txt HTTP/1.1
> Host: cs531-cs_cbrad022
> If-Match: "20933948kjaldsf000002"
> Connection: close
> 

< HTTP/1.1 412 Precondition Failed
< Date: Mon, 05 Dec 2022 08:03:00 GMT
< Server: calebsserver
< Content-Type: text/html
< Transfer-Encoding: chunked
< Connection: close
< 
* [Payload redacted (51 bytes)]

--------------------------------------------------------------------------------
test_explicit_language_charset_etag: Test whether explicit language and charset as extensions returns ETag and Content-Type with charset
* Connecting to the `cs531-cs_cbrad022:80` server
* Request data sent
* Response data read
* Response parsed
* Status is `200`
* `Content-Type` header is present
* `Content-Type` header has value `text/html; charset=koi8-r`
* `Content-Language` header is present
* `Content-Language` header has value `ru`
* `ETag` header is present
* `ETag` is not empty and properly formatted in double quotes as `"a4fb640ff753fbdeb23ddc7cf605dd0d"`
* Payload size is `7277` bytes
[PASSED]

> GET /a3-test/index.html.ru.koi8-r HTTP/1.1
> Host: cs531-cs_cbrad022:80
> User-Agent: CS531 Assignment 3 Tester/1670270579
> Connection: close
> 

< HTTP/1.1 200 OK
< Date: Mon, 05 Dec 2022 08:03:00 GMT
< Server: calebsserver
< Content-Type: text/html; charset=koi8-r
< Content-Language: ru
< Last-Modified: Sat, 03 Nov 2018 02:10:11 GMT
< Content-Length: 7277
< ETag: "a4fb640ff753fbdeb23ddc7cf605dd0d"
< 
* [Payload redacted (7277 bytes)]

--------------------------------------------------------------------------------
test_valid_etag_conditional_get: Test whether conditional GET with a valid ETag returns 200 OK
* Connecting to the `cs531-cs_cbrad022:80` server
* Request data sent
* Response data read
* Response parsed
* Status is `200`
* `Content-Type` header is present
* `Content-Type` header begins with `text/html`
* `Content-Type` header is present
* `Content-Type` header has value `text/html; charset=koi8-r`
* `Content-Language` header is present
* `Content-Language` header has value `ru`
* Payload size is `7277` bytes
[PASSED]

> GET /a3-test/index.html.ru.koi8-r HTTP/1.1
> Host: cs531-cs_cbrad022
> If-Match: "a4fb640ff753fbdeb23ddc7cf605dd0d"
> Connection: close
> 

< HTTP/1.1 200 OK
< Date: Mon, 05 Dec 2022 08:03:00 GMT
< Server: calebsserver
< Content-Type: text/html; charset=koi8-r
< Content-Language: ru
< Last-Modified: Sat, 03 Nov 2018 02:10:11 GMT
< Content-Length: 7277
< ETag: "a4fb640ff753fbdeb23ddc7cf605dd0d"
< 
* [Payload redacted (7277 bytes)]

--------------------------------------------------------------------------------
test_pipeline_range_negotiate: Test whether multiple pipelined requests with content negotiations are processed and returned in the same order
* Connecting to the `cs531-cs_cbrad022:80` server
* Request data sent
* Response data read
* Response parsed
* Status is `206`
* `Content-Type` header is present
* `Content-Type` header begins with `text/html`
[FAILED] ASSERTION: `Content-Range` header should be present

> HEAD http://cs531-cs_cbrad022/a3-test/index.html.en HTTP/1.1
> Range: bytes=-100
> Host: cs531-cs_cbrad022:80
> 
> HEAD http://cs531-cs_cbrad022/a3-test/index.html HTTP/1.1
> Negotiate: 1.0
> Host: cs531-cs_cbrad022:80
> 
> HEAD http://cs531-cs_cbrad022/a3-test/index.html.ja.jis HTTP/1.1
> Host: cs531-cs_cbrad022:80
> Connection: close
> 

< HTTP/1.1 206 Partial Content
< Date: Mon, 05 Dec 2022 08:03:00 GMT
< Server: calebsserver
< Content-Type: text/html
< Content-Language: en
< Last-Modified: Sat, 03 Nov 2018 02:10:11 GMT
< Content-Length: 100
< ETag: "8861349ef2fe9e4a28054f96832ae7cf"
< 
* [Payload redacted (535 bytes)]

=================================== SUMMARY ====================================
Server: cs531-cs_cbrad022:80
Test Case Results:
PASSED: test_useragent_get_text_ok
PASSED: test_partial_content_range_language
PASSED: test_chunked_404
FAILED: test_conditional_head_image_fresh
PASSED: test_conditional_head_image_stale
PASSED: test_no_accept_header_multiple_choices
PASSED: test_ambiguous_accept_header_multiple_choices
FAILED: test_accept_header_png_ok
FAILED: test_accept_header_text_ok
PASSED: test_not_accptable_encoding
PASSED: test_explicit_extention_ignore_content_negotiation
PASSED: test_ambiguous_accept_language_multiple_choices
PASSED: test_not_accptable_incompatiple_charset
PASSED: test_partial_content_range_text
PASSED: test_etag_precondition_failure
PASSED: test_explicit_language_charset_etag
PASSED: test_valid_etag_conditional_get
FAILED: test_pipeline_range_negotiate
--------------------------------------------------------------------------------
TOTAL: 18, PASSED: 14, FAILED: 4
===============================================================================

Destroying server: cs531-cs_cbrad022
Server `cs531-cs_cbrad022` destroyed successfully.
ibnesayeed commented 1 year ago
================================================================================
Assignment: cs531a2
Student: Caleb Bradford <cs_cbrad022@cs.odu.edu>
Time: 20221205-200103 UTC
Repository: https://github.com/calebkbrad/calebsserver/tree/a5
Server: cs531-cs_cbrad022
================================================================================

Deploying server: cs531-cs_cbrad022

Cloning the `https://github.com/calebkbrad/calebsserver.git` repo and checking the `a5` branch/tag out
Released at: 2022-11-30T04:56:07Z
Step 1/13 : FROM    python:3
 ---> e285995a3494
Step 2/13 : LABEL   maintainer = "Caleb Bradford <@calebkbradford>"
 ---> Using cache
 ---> 74579e05b181
Step 3/13 : ENV WEBROOT="/var/www"
 ---> Using cache
 ---> d2ddd397f43b
Step 4/13 : WORKDIR ${WEBROOT}
 ---> Using cache
 ---> 5d9b75cadc40
Step 5/13 : RUN     wget https://raw.githubusercontent.com/ibnesayeed/webserver-tester/master/sample/cs531-test-files.tar.gz         && tar xvzf cs531-test-files.tar.gz         && rm -rf cs531-test-files.tar.gz
 ---> Using cache
 ---> fd41172e0a28
Step 6/13 : WORKDIR /app
 ---> Using cache
 ---> 635268e75bbc
Step 7/13 : COPY    src/server.py /app
 ---> Using cache
 ---> 73bd9617484c
Step 8/13 : COPY    errorpages /app/errorpages
 ---> Using cache
 ---> 07a23b381938
Step 9/13 : COPY    settings /app/settings
 ---> Using cache
 ---> 392c70a435b4
Step 10/13 : RUN     touch /app/access.log
 ---> Using cache
 ---> caa19c100c79
Step 11/13 : RUN     chmod a+x server.py
 ---> Using cache
 ---> 05066e490079
Step 12/13 : RUN     pip install pyyaml
 ---> Using cache
 ---> 7685082e6e5d
Step 13/13 : ENTRYPOINT [ "./server.py" ]
 ---> Using cache
 ---> e61518d251ba
Successfully built e61518d251ba
Successfully tagged cs531/cs_cbrad022:a5

A new container is created and the server `cs531-cs_cbrad022` is deployed successfully

Testing server: cs531-cs_cbrad022 against cs531a2 test suite

Testing cs531-cs_cbrad022:80
--------------------------------------------------------------------------------
test_get_directory_listing: Test whether a2-test directory root returns directory listing
* Connecting to the `cs531-cs_cbrad022:80` server
* Request data sent
* Response data read
* Response parsed
* Status is `200`
* `Content-Type` header is present
* `Content-Type` header begins with `text/html`
* Payload contains `coolcar.html`
* Payload contains `ford`
* Socket connection is closed
[PASSED]

> GET http://cs531-cs_cbrad022/a2-test/ HTTP/1.1
> Host: cs531-cs_cbrad022
> Connection: close
> 

< HTTP/1.1 200 OK
< Date: Mon, 05 Dec 2022 08:01:10 GMT
< Server: calebsserver
< Content-Type: text/html
< Last-Modified: Sat, 20 Oct 2018 03:46:18 GMT
< Content-Length: 4096
< 
* [Payload redacted (674 bytes)]

--------------------------------------------------------------------------------
test_redirect_to_trailing_slash_for_directory_url: Test whether redirects URL to trailing slashes when missing for existing directories
* Connecting to the `cs531-cs_cbrad022:80` server
* Request data sent
* Response data read
* Response parsed
* Status is `301`
* `Location` header is present
* `Location` header ends with `/a2-test/2/`
* Socket connection is closed
[PASSED]

> GET http://cs531-cs_cbrad022/a2-test/2 HTTP/1.1
> Host: cs531-cs_cbrad022
> Connection: close
> 

< HTTP/1.1 301 Moved Permanently
< Date: Mon, 05 Dec 2022 08:01:10 GMT
< Server: calebsserver
< Location: /a2-test/2/
< 
* [Payload redacted (47 bytes)]

--------------------------------------------------------------------------------
test_redirect_to_trailing_slash_for_directory_path: Test whether redirects path to trailing slashes when missing for existing directories
* Connecting to the `cs531-cs_cbrad022:80` server
* Request data sent
* Response data read
* Response parsed
* Status is `301`
* `Location` header is present
* `Location` header ends with `/a2-test/1/`
* Socket connection is closed
[PASSED]

> GET /a2-test/1 HTTP/1.1
> Host: cs531-cs_cbrad022
> Connection: close
> 

< HTTP/1.1 301 Moved Permanently
< Date: Mon, 05 Dec 2022 08:01:10 GMT
< Server: calebsserver
< Location: /a2-test/1/
< 
* [Payload redacted (47 bytes)]

--------------------------------------------------------------------------------
test_get_default_index_file: Test whether default index.html is returned instead of directory listing
* Connecting to the `cs531-cs_cbrad022:80` server
* Request data sent
* Response data read
* Response parsed
* Status is `200`
* `Content-Type` header is present
* `Content-Type` header begins with `text/html`
* Payload is not empty
* Fetching `/a2-test/2/index.html` for content comparison
* Contents of `/a2-test/2/` and `/a2-test/2/index.html` are the same
* Socket connection is closed
[PASSED]

> GET http://cs531-cs_cbrad022/a2-test/2/ HTTP/1.1
> Host: cs531-cs_cbrad022
> Connection: close
> 

< HTTP/1.1 200 OK
< Date: Mon, 05 Dec 2022 08:01:10 GMT
< Server: calebsserver
< Content-Type: text/html
< Last-Modified: Sat, 20 Oct 2018 02:33:21 GMT
< Content-Length: 1936
< ETag: "e5359f8ba4c1697b0d5088c8344d08d5"
< 
* [Payload redacted (1936 bytes)]

--------------------------------------------------------------------------------
test_redirect_as_per_regexp_trailing_wildcard_capture: Test whether redirects as per the regular expression with wildcard trailing capture group
* Connecting to the `cs531-cs_cbrad022:80` server
* Request data sent
* Response data read
* Response parsed
* Status is `302`
* `Location` header is present
* `Location` header ends with `/a2-test/1/1.1/assignment1.ppt`
[PASSED]

> HEAD /a2-test/1/1.3/assignment1.ppt HTTP/1.1
> Host: cs531-cs_cbrad022
> Connection: close
> 

< HTTP/1.1 302 Found
< Date: Mon, 05 Dec 2022 08:01:10 GMT
< Server: calebsserver
< Location: /a2-test/1/1.1/assignment1.ppt
< 
* [Payload redacted (55 bytes)]

--------------------------------------------------------------------------------
test_redirect_as_per_regexp_trailing_specific_file: Test whether redirects as per the regular expression with a specific trailing file name
* Connecting to the `cs531-cs_cbrad022:80` server
* Request data sent
* Response data read
* Response parsed
* Status is `302`
* `Location` header is present
* `Location` header ends with `/a2-test/galaxie.html`
[PASSED]

> HEAD /a2-test/coolcar.html HTTP/1.1
> Host: cs531-cs_cbrad022
> Connection: close
> 

< HTTP/1.1 302 Found
< Date: Mon, 05 Dec 2022 08:01:10 GMT
< Server: calebsserver
< Location: /a2-test/galaxie.html
< 
* [Payload redacted (55 bytes)]

--------------------------------------------------------------------------------
test_dont_redirect_target_file: Test whether the target of the configured redirect returns 200 OK
* Connecting to the `cs531-cs_cbrad022:80` server
* Request data sent
* Response data read
* Response parsed
* Status is `200`
* `Content-Type` header is present
* `Content-Type` header begins with `text/html`
* Payload is empty
[PASSED]

> HEAD /a2-test/galaxie.html HTTP/1.1
> Host: cs531-cs_cbrad022
> Connection: close
> 

< HTTP/1.1 200 OK
< Date: Mon, 05 Dec 2022 08:01:10 GMT
< Server: calebsserver
< Content-Type: text/html
< Last-Modified: Sat, 20 Oct 2018 03:44:27 GMT
< Content-Length: 96
< ETag: "7d344af10346d1a6f168ecc66d6885af"

--------------------------------------------------------------------------------
test_conditional_head_fresh: Test whether conditional HEAD of a fresh file returns 304 Not Modified
* Connecting to the `cs531-cs_cbrad022:80` server
* Request data sent
* Response data read
* Response parsed
[FAILED] ASSERTION: Status expected `304`, returned `200`

> HEAD /a2-test/2/fairlane.html HTTP/1.1
> Host: cs531-cs_cbrad022
> If-Modified-Since: Sat, 20 Oct 2018 02:33:21 GMT
> Connection: close
> 

< HTTP/1.1 200 OK
< Date: Mon, 05 Dec 2022 08:01:10 GMT
< Server: calebsserver
< Content-Type: text/html
< Last-Modified: Sat, 20 Oct 2018 02:33:21 GMT
< Content-Length: 1936
< ETag: "e5359f8ba4c1697b0d5088c8344d08d5"

--------------------------------------------------------------------------------
test_conditional_head_stale: Test whether conditional HEAD of a stale file returns 200 OK
* Connecting to the `cs531-cs_cbrad022:80` server
* Request data sent
* Response data read
* Response parsed
* Status is `200`
* `Content-Type` header is present
* `Content-Type` header begins with `text/html`
* Payload is empty
[PASSED]

> HEAD /a2-test/2/fairlane.html HTTP/1.1
> Host: cs531-cs_cbrad022
> If-Modified-Since: Sat, 20 Oct 2018 02:33:20 GMT
> Connection: close
> 

< HTTP/1.1 200 OK
< Date: Mon, 05 Dec 2022 08:01:10 GMT
< Server: calebsserver
< Content-Type: text/html
< Last-Modified: Sat, 20 Oct 2018 02:33:21 GMT
< Content-Length: 1936
< ETag: "e5359f8ba4c1697b0d5088c8344d08d5"

--------------------------------------------------------------------------------
test_conditional_head_invalid_datetime: Test whether conditional HEAD with invalid datetime returns 200 OK
* Connecting to the `cs531-cs_cbrad022:80` server
* Request data sent
* Response data read
* Response parsed
* Status is `200`
* `Content-Type` header is present
* `Content-Type` header begins with `text/html`
* Payload is empty
[PASSED]

> HEAD /a2-test/2/fairlane.html HTTP/1.1
> Host: cs531-cs_cbrad022
> If-Modified-Since: who-doesn't-want-a-fairlane?
> Connection: close
> 

< HTTP/1.1 200 OK
< Date: Mon, 05 Dec 2022 08:01:10 GMT
< Server: calebsserver
< Content-Type: text/html
< Last-Modified: Sat, 20 Oct 2018 02:33:21 GMT
< Content-Length: 1936
< ETag: "e5359f8ba4c1697b0d5088c8344d08d5"

--------------------------------------------------------------------------------
test_conditional_head_unsupported_datetime_format: Test whether conditional HEAD with unsupported datetime format returns 200 OK
* Connecting to the `cs531-cs_cbrad022:80` server
* Request data sent
* Response data read
* Response parsed
* Status is `200`
* `Content-Type` header is present
* `Content-Type` header begins with `text/html`
* Payload is empty
[PASSED]

> HEAD /a2-test/2/fairlane.html HTTP/1.1
> Host: cs531-cs_cbrad022
> If-Modified-Since: 2018-10-20 02:33:21.304307000 -0000
> Connection: close
> 

< HTTP/1.1 200 OK
< Date: Mon, 05 Dec 2022 08:01:10 GMT
< Server: calebsserver
< Content-Type: text/html
< Last-Modified: Sat, 20 Oct 2018 02:33:21 GMT
< Content-Length: 1936
< ETag: "e5359f8ba4c1697b0d5088c8344d08d5"

--------------------------------------------------------------------------------
test_include_etag: Test whether the HEAD response contains an ETag
* Connecting to the `cs531-cs_cbrad022:80` server
* Request data sent
* Response data read
* Response parsed
* Status is `200`
* `ETag` header is present
* `ETag` is not empty and properly formatted in double quotes as `"e5359f8ba4c1697b0d5088c8344d08d5"`
[PASSED]

> HEAD /a2-test/2/fairlane.html HTTP/1.1
> Host: cs531-cs_cbrad022
> Connection: close
> 

< HTTP/1.1 200 OK
< Date: Mon, 05 Dec 2022 08:01:10 GMT
< Server: calebsserver
< Content-Type: text/html
< Last-Modified: Sat, 20 Oct 2018 02:33:21 GMT
< Content-Length: 1936
< ETag: "e5359f8ba4c1697b0d5088c8344d08d5"

--------------------------------------------------------------------------------
test_valid_etag_ok: Test whether a valid ETag returns 200 OK
* Connecting to the `cs531-cs_cbrad022:80` server
* Request data sent
* Response data read
* Response parsed
* Status is `200`
* `Content-Type` header is present
* `Content-Type` header begins with `text/html`
* Payload contains `1966 Ford Fairlane`
[PASSED]

> GET /a2-test/2/fairlane.html HTTP/1.1
> Host: cs531-cs_cbrad022
> If-Match: "e5359f8ba4c1697b0d5088c8344d08d5"
> Connection: close
> 

< HTTP/1.1 200 OK
< Date: Mon, 05 Dec 2022 08:01:10 GMT
< Server: calebsserver
< Content-Type: text/html
< Last-Modified: Sat, 20 Oct 2018 02:33:21 GMT
< Content-Length: 1936
< ETag: "e5359f8ba4c1697b0d5088c8344d08d5"
< 
* [Payload redacted (1936 bytes)]

--------------------------------------------------------------------------------
test_etag_if_match_failure: Test whether a random ETag returns 412 Precondition Failed
* Connecting to the `cs531-cs_cbrad022:80` server
* Request data sent
* Response data read
* Response parsed
* Status is `412`
[PASSED]

> GET /a2-test/2/fairlane.html HTTP/1.1
> Host: cs531-cs_cbrad022
> If-Match: "203948kjaldsf002"
> Connection: close
> 

< HTTP/1.1 412 Precondition Failed
< Date: Mon, 05 Dec 2022 08:01:10 GMT
< Server: calebsserver
< Content-Type: text/html
< Transfer-Encoding: chunked
< Connection: close
< 
* [Payload redacted (51 bytes)]

--------------------------------------------------------------------------------
test_implicit_keep_alive_until_timeout: Test whether the socket connection is kept alive by default and closed after the set timeout
* Connecting to the `cs531-cs_cbrad022:80` server
* Request data sent
* Response data read
* Response parsed
* Status is `200`
* `Content-Type` header is present
* `Content-Type` header begins with `text/html`
* Payload is empty
* Socket connection is kept alive
* Making a subsequent request after `5` seconds
* Reusing existing connection
* Request data sent
* Response data read
* Response parsed
* Status is `408`
* `Connection` header is present
* `Connection` header has value `close`
* Socket connection is closed
[PASSED]

> HEAD /a2-test/2/index.html HTTP/1.1
> Host: cs531-cs_cbrad022
> 
> HEAD /a2-test/2/index.html HTTP/1.1
> Host: cs531-cs_cbrad022
> 

< HTTP/1.1 200 OK
< Date: Mon, 05 Dec 2022 08:01:10 GMT
< Server: calebsserver
< Content-Type: text/html
< Last-Modified: Sat, 20 Oct 2018 02:33:21 GMT
< Content-Length: 1936
< ETag: "e5359f8ba4c1697b0d5088c8344d08d5"
< 
< HTTP/1.1 408 Request Timeout
< Date: Mon, 05 Dec 2022 08:01:15 GMT
< Server: calebsserver
< Content-Type: text/html
< Transfer-Encoding: chunked
< Connection: close
< 
* [Payload redacted (80 bytes)]

--------------------------------------------------------------------------------
test_explicit_keep_alive_until_timeout: Test whether the socket connection is kept alive when explicitly requested and closed after the set timeout
* Connecting to the `cs531-cs_cbrad022:80` server
* Request data sent
* Response data read
* Response parsed
* Status is `200`
* `Content-Type` header is present
* `Content-Type` header begins with `text/html`
* Payload is empty
* Socket connection is kept alive
* Making a subsequent request after `5` seconds
* Reusing existing connection
* Request data sent
* Response data read
* Response parsed
* Status is `408`
* `Connection` header is present
* `Connection` header has value `close`
* Socket connection is closed
[PASSED]

> HEAD /a2-test/2/index.html HTTP/1.1
> Host: cs531-cs_cbrad022
> Connection: keep-alive
> 
> HEAD /a2-test/2/index.html HTTP/1.1
> Host: cs531-cs_cbrad022
> Connection: keep-alive
> 

< HTTP/1.1 200 OK
< Date: Mon, 05 Dec 2022 08:01:17 GMT
< Server: calebsserver
< Content-Type: text/html
< Last-Modified: Sat, 20 Oct 2018 02:33:21 GMT
< Content-Length: 1936
< ETag: "e5359f8ba4c1697b0d5088c8344d08d5"
< 
< HTTP/1.1 408 Request Timeout
< Date: Mon, 05 Dec 2022 08:01:22 GMT
< Server: calebsserver
< Content-Type: text/html
< Transfer-Encoding: chunked
< Connection: close
< 
* [Payload redacted (80 bytes)]

--------------------------------------------------------------------------------
test_trace_unnecessary_conditionals: Test whether many unnecessary conditionals are not processed
* Connecting to the `cs531-cs_cbrad022:80` server
* Request data sent
* Response data read
* Response parsed
* Status is `200`
* `Content-Type` header is present
* `Content-Type` header begins with `message/http`
* Payload begins with `TRACE /a2-test/2/index.html HTTP/1.1`
[PASSED]

> TRACE /a2-test/2/index.html HTTP/1.1
> Host: cs531-cs_cbrad022
> If-Match: "not-a-real-etag"
> If-None-Match: "also-not-a-real-etag"
> If-Modified-Since: Fri, 19 Oct 2018 22:33:21 GMT
> If-Unmodified-Since: Fri, 19 Oct 2018 22:33:21 GMT
> Connection: close
> 

< HTTP/1.1 200 OK
< Date: Mon, 05 Dec 2022 08:01:23 GMT
< Server: calebsserver
< Content-Type: message/http
< Connection: close
< 
* [Payload redacted (254 bytes)]

--------------------------------------------------------------------------------
test_pipeline_requests: Test whether multiple pipelined requests are processed and returned in the same order
* Connecting to the `cs531-cs_cbrad022:80` server
* Request data sent
* Response data read
* Response parsed
* Status is `200`
* `Content-Type` header is present
* `Content-Type` header begins with `text/html`
* Parsing second response
* Response parsed
* Status is `200`
* `Content-Type` header is present
* `Content-Type` header begins with `text/html`
* Parsing third response
* Response parsed
* Status is `200`
* `Content-Type` header is present
* `Content-Type` header begins with `text/html`
* Payload contains `coolcar.html`
* Payload contains `ford`
* Socket connection is closed
[PASSED]

> HEAD /a2-test/ HTTP/1.1
> Host: cs531-cs_cbrad022
> 
> HEAD /a2-test/2/index.html HTTP/1.1
> Host: cs531-cs_cbrad022
> 
> GET /a2-test/ HTTP/1.1
> Host: cs531-cs_cbrad022
> Connection: close
> 

< HTTP/1.1 200 OK
< Date: Mon, 05 Dec 2022 08:01:23 GMT
< Server: calebsserver
< Content-Type: text/html
< Last-Modified: Sat, 20 Oct 2018 03:46:18 GMT
< Content-Length: 4096
< 
< HTTP/1.1 200 OK
< Date: Mon, 05 Dec 2022 08:01:23 GMT
< Server: calebsserver
< Content-Type: text/html
< Last-Modified: Sat, 20 Oct 2018 02:33:21 GMT
< Content-Length: 1936
< ETag: "e5359f8ba4c1697b0d5088c8344d08d5"
< 
< HTTP/1.1 200 OK
< Date: Mon, 05 Dec 2022 08:01:23 GMT
< Server: calebsserver
< Content-Type: text/html
< Last-Modified: Sat, 20 Oct 2018 03:46:18 GMT
< Content-Length: 4096
< 
* [Payload redacted (674 bytes)]

--------------------------------------------------------------------------------
test_long_lived_connection: Test whether the socket connection is kept alive to process multiple requests successively
* Connecting to the `cs531-cs_cbrad022:80` server
* Request data sent
* Response data read
* Response parsed
* Status is `200`
* `Content-Type` header is present
* `Content-Type` header begins with `text/html`
* Payload is empty
* Socket connection is kept alive
* Making second request
* Reusing existing connection
* Request data sent
* Response data read
* Response parsed
* Status is `200`
* `Content-Type` header is present
* `Content-Type` header begins with `text/html`
* Payload is empty
* Socket connection is kept alive
* Making third request
* Reusing existing connection
* Request data sent
* Response data read
* Response parsed
* Status is `200`
* `Content-Type` header is present
* `Content-Type` header begins with `text/html`
* Payload contains `coolcar.html`
* Payload contains `ford`
* Socket connection is closed
[PASSED]

> HEAD /a2-test/ HTTP/1.1
> Host: cs531-cs_cbrad022
> 
> HEAD /a2-test/2/index.html HTTP/1.1
> Host: cs531-cs_cbrad022
> 
> GET /a2-test/ HTTP/1.1
> Host: cs531-cs_cbrad022
> Connection: close
> 

< HTTP/1.1 200 OK
< Date: Mon, 05 Dec 2022 08:01:23 GMT
< Server: calebsserver
< Content-Type: text/html
< Last-Modified: Sat, 20 Oct 2018 03:46:18 GMT
< Content-Length: 4096
< 
< HTTP/1.1 200 OK
< Date: Mon, 05 Dec 2022 08:01:24 GMT
< Server: calebsserver
< Content-Type: text/html
< Last-Modified: Sat, 20 Oct 2018 02:33:21 GMT
< Content-Length: 1936
< ETag: "e5359f8ba4c1697b0d5088c8344d08d5"
< 
< HTTP/1.1 200 OK
< Date: Mon, 05 Dec 2022 08:01:24 GMT
< Server: calebsserver
< Content-Type: text/html
< Last-Modified: Sat, 20 Oct 2018 03:46:18 GMT
< Content-Length: 4096
< 
* [Payload redacted (674 bytes)]

=================================== SUMMARY ====================================
Server: cs531-cs_cbrad022:80
Test Case Results:
PASSED: test_get_directory_listing
PASSED: test_redirect_to_trailing_slash_for_directory_url
PASSED: test_redirect_to_trailing_slash_for_directory_path
PASSED: test_get_default_index_file
PASSED: test_redirect_as_per_regexp_trailing_wildcard_capture
PASSED: test_redirect_as_per_regexp_trailing_specific_file
PASSED: test_dont_redirect_target_file
FAILED: test_conditional_head_fresh
PASSED: test_conditional_head_stale
PASSED: test_conditional_head_invalid_datetime
PASSED: test_conditional_head_unsupported_datetime_format
PASSED: test_include_etag
PASSED: test_valid_etag_ok
PASSED: test_etag_if_match_failure
PASSED: test_implicit_keep_alive_until_timeout
PASSED: test_explicit_keep_alive_until_timeout
PASSED: test_trace_unnecessary_conditionals
PASSED: test_pipeline_requests
PASSED: test_long_lived_connection
--------------------------------------------------------------------------------
TOTAL: 19, PASSED: 18, FAILED: 1
===============================================================================

Destroying server: cs531-cs_cbrad022
Server `cs531-cs_cbrad022` destroyed successfully.
ibnesayeed commented 1 year ago
================================================================================
Assignment: cs531a1
Student: Caleb Bradford <cs_cbrad022@cs.odu.edu>
Time: 20221205-195953 UTC
Repository: https://github.com/calebkbrad/calebsserver/tree/a5
Server: cs531-cs_cbrad022
================================================================================

Deploying server: cs531-cs_cbrad022

Cloning the `https://github.com/calebkbrad/calebsserver.git` repo and checking the `a5` branch/tag out
Released at: 2022-11-30T04:56:07Z
Step 1/13 : FROM    python:3
 ---> e285995a3494
Step 2/13 : LABEL   maintainer = "Caleb Bradford <@calebkbradford>"
 ---> Using cache
 ---> 74579e05b181
Step 3/13 : ENV WEBROOT="/var/www"
 ---> Using cache
 ---> d2ddd397f43b
Step 4/13 : WORKDIR ${WEBROOT}
 ---> Using cache
 ---> 5d9b75cadc40
Step 5/13 : RUN     wget https://raw.githubusercontent.com/ibnesayeed/webserver-tester/master/sample/cs531-test-files.tar.gz         && tar xvzf cs531-test-files.tar.gz         && rm -rf cs531-test-files.tar.gz
 ---> Using cache
 ---> fd41172e0a28
Step 6/13 : WORKDIR /app
 ---> Using cache
 ---> 635268e75bbc
Step 7/13 : COPY    src/server.py /app
 ---> Using cache
 ---> 73bd9617484c
Step 8/13 : COPY    errorpages /app/errorpages
 ---> Using cache
 ---> 07a23b381938
Step 9/13 : COPY    settings /app/settings
 ---> Using cache
 ---> 392c70a435b4
Step 10/13 : RUN     touch /app/access.log
 ---> Using cache
 ---> caa19c100c79
Step 11/13 : RUN     chmod a+x server.py
 ---> Using cache
 ---> 05066e490079
Step 12/13 : RUN     pip install pyyaml
 ---> Using cache
 ---> 7685082e6e5d
Step 13/13 : ENTRYPOINT [ "./server.py" ]
 ---> Using cache
 ---> e61518d251ba
Successfully built e61518d251ba
Successfully tagged cs531/cs_cbrad022:a5

A new container is created and the server `cs531-cs_cbrad022` is deployed successfully

Testing server: cs531-cs_cbrad022 against cs531a1 test suite

Testing cs531-cs_cbrad022:80
--------------------------------------------------------------------------------
test_url_get_ok: Test whether the URL of the assignment 1 directory returns HTTP/1.1 200 OK on GET
* Connecting to the `cs531-cs_cbrad022:80` server
* Request data sent
* Response data read
* Response parsed
* HTTP version is `HTTP/1.1`
* Status is `200`
* `Date` header is present
* `Date` header is in the preferred RCF7231 format
[PASSED]

> GET http://cs531-cs_cbrad022/a1-test/2/index.html HTTP/1.1
> Host: cs531-cs_cbrad022
> Connection: close
> 

< HTTP/1.1 200 OK
< Date: Mon, 05 Dec 2022 08:00:00 GMT
< Server: calebsserver
< Content-Type: text/html
< Last-Modified: Sat, 20 Oct 2018 02:33:21 GMT
< Content-Length: 1936
< ETag: "e5359f8ba4c1697b0d5088c8344d08d5"
< 
* [Payload redacted (1936 bytes)]

--------------------------------------------------------------------------------
test_url_head_ok: Test whether the URL of the assignment 1 directory returns 200 on HEAD
* Connecting to the `cs531-cs_cbrad022:80` server
* Request data sent
* Response data read
* Response parsed
* Status is `200`
* `Content-Type` header is present
* `Content-Type` header begins with `text/html`
* `Date` header is present
* `Date` header is in the preferred RCF7231 format
* Payload is empty
[PASSED]

> HEAD http://cs531-cs_cbrad022/a1-test/2/index.html HTTP/1.1
> Host: cs531-cs_cbrad022
> Connection: close
> 

< HTTP/1.1 200 OK
< Date: Mon, 05 Dec 2022 08:00:00 GMT
< Server: calebsserver
< Content-Type: text/html
< Last-Modified: Sat, 20 Oct 2018 02:33:21 GMT
< Content-Length: 1936
< ETag: "e5359f8ba4c1697b0d5088c8344d08d5"

--------------------------------------------------------------------------------
test_path_head_ok: Test whether the relative path of the assignment 1 directory returns 200 on HEAD
* Connecting to the `cs531-cs_cbrad022:80` server
* Request data sent
* Response data read
* Response parsed
* Status is `200`
* `Content-Type` header is present
* `Content-Type` header begins with `text/html`
* `Date` header is present
* `Date` header is in the preferred RCF7231 format
* Payload is empty
[PASSED]

> HEAD /a1-test/2/index.html HTTP/1.1
> Host: cs531-cs_cbrad022
> Connection: close
> 

< HTTP/1.1 200 OK
< Date: Mon, 05 Dec 2022 08:00:00 GMT
< Server: calebsserver
< Content-Type: text/html
< Last-Modified: Sat, 20 Oct 2018 02:33:21 GMT
< Content-Length: 1936
< ETag: "e5359f8ba4c1697b0d5088c8344d08d5"

--------------------------------------------------------------------------------
test_path_options_ok: Test whether the relative path of the assignment 1 directory returns 200 on OPTIONS
* Connecting to the `cs531-cs_cbrad022:80` server
* Request data sent
* Response data read
* Response parsed
* Status is `200`
* `Allow` header is present
* `Allow` header contains `GET`
* `Date` header is present
* `Date` header is in the preferred RCF7231 format
[PASSED]

> OPTIONS /a1-test/2/index.html HTTP/1.1
> Host: cs531-cs_cbrad022
> Connection: close
> 

< HTTP/1.1 200 OK
< Date: Mon, 05 Dec 2022 08:00:00 GMT
< Server: calebsserver
< Allow: GET, HEAD, TRACE, OPTIONS, POST
< Connection: close

--------------------------------------------------------------------------------
test_get_missing: Test whether a non-existing path returns 404 on GET
* Connecting to the `cs531-cs_cbrad022:80` server
* Request data sent
* Response data read
* Response parsed
* HTTP version is `HTTP/1.1`
* Status is `404`
* `Date` header is present
* `Date` header is in the preferred RCF7231 format
[PASSED]

> GET /1/1.1/go%20hokies.html HTTP/1.1
> Host: cs531-cs_cbrad022
> Connection: close
> 

< HTTP/1.1 404 Not Found
< Date: Mon, 05 Dec 2022 08:00:00 GMT
< Server: calebsserver
< Content-Type: text/html
< Transfer-Encoding: chunked
< Connection: close
< 
* [Payload redacted (67 bytes)]

--------------------------------------------------------------------------------
test_get_duplicate_path_prefix: Test tight path prefix checking
* Connecting to the `cs531-cs_cbrad022:80` server
* Request data sent
* Response data read
* Response parsed
* HTTP version is `HTTP/1.1`
* Status is `404`
* `Date` header is present
* `Date` header is in the preferred RCF7231 format
[PASSED]

> GET /a1-test/a1-test/ HTTP/1.1
> Host: cs531-cs_cbrad022
> Connection: close
> 

< HTTP/1.1 404 Not Found
< Date: Mon, 05 Dec 2022 08:00:00 GMT
< Server: calebsserver
< Content-Type: text/html
< Transfer-Encoding: chunked
< Connection: close
< 
* [Payload redacted (63 bytes)]

--------------------------------------------------------------------------------
test_unsupported_version: Test whether a request with unsupported version returns 505
* Connecting to the `cs531-cs_cbrad022:80` server
* Request data sent
* Response data read
* Response parsed
* Status is `505`
* `Date` header is present
* `Date` header is in the preferred RCF7231 format
[PASSED]

> GET / HTTP/1.11
> Host: cs531-cs_cbrad022
> Connection: close
> 

< HTTP/1.1 505 HTTP Version not Supported
< Date: Mon, 05 Dec 2022 08:00:00 GMT
< Server: calebsserver
< Content-Type: text/html
< Transfer-Encoding: chunked
< Connection: close
< 
* [Payload redacted (48 bytes)]

--------------------------------------------------------------------------------
test_invalid_request: Test whether an invalid request returns 400
* Connecting to the `cs531-cs_cbrad022:80` server
* Request data sent
* Response data read
* Response parsed
* Status is `400`
* `Date` header is present
* `Date` header is in the preferred RCF7231 format
[PASSED]

> qwerty
> 

< HTTP/1.1 400 Bad Request
< Date: Mon, 05 Dec 2022 08:00:00 GMT
< Server: calebsserver
< Content-Type: text/html
< Transfer-Encoding: chunked
< Connection: close
< 
* [Payload redacted (81 bytes)]

--------------------------------------------------------------------------------
test_missing_host_header: Test whether missing Host header in a request returns 400
* Connecting to the `cs531-cs_cbrad022:80` server
* Request data sent
* Response data read
* Response parsed
* Status is `400`
* `Date` header is present
* `Date` header is in the preferred RCF7231 format
[PASSED]

> GET / HTTP/1.1
> Connection: close
> 

< HTTP/1.1 400 Bad Request
< Date: Mon, 05 Dec 2022 08:00:00 GMT
< Server: calebsserver
< Content-Type: text/html
< Transfer-Encoding: chunked
< Connection: close
< 
* [Payload redacted (81 bytes)]

--------------------------------------------------------------------------------
test_post_not_implemented: Test whether the assignment 1 returns 501 on POST
* Connecting to the `cs531-cs_cbrad022:80` server
* Request data sent
* Response data read
[FAILED] Empty response

> POST /a1-test/ HTTP/1.1
> Host: cs531-cs_cbrad022
> Connection: close
> 

--------------------------------------------------------------------------------
test_trace_echoback: Test whether the server echoes back the request on TRACE
* Connecting to the `cs531-cs_cbrad022:80` server
* Request data sent
* Response data read
* Response parsed
* Status is `200`
* `Content-Type` header is present
* `Content-Type` header begins with `message/http`
* `Date` header is present
* `Date` header is in the preferred RCF7231 format
* Payload begins with `TRACE /a1-test/1/1.4/ HTTP/1.1`
* Payload contains `User-Agent: CS531 Assignment 1 Tester/1670270400`
* Payload contains `Connection: close`
[PASSED]

> TRACE /a1-test/1/1.4/ HTTP/1.1
> Host: cs531-cs_cbrad022
> User-Agent: CS531 Assignment 1 Tester/1670270400
> Connection: close
> 

< HTTP/1.1 200 OK
< Date: Mon, 05 Dec 2022 08:00:00 GMT
< Server: calebsserver
< Content-Type: message/http
< Connection: close
< 
* [Payload redacted (128 bytes)]

--------------------------------------------------------------------------------
test_get_escaped_file_name: Test whether the escaped file name is respected
* Connecting to the `cs531-cs_cbrad022:80` server
* Request data sent
* Response data read
* Response parsed
* Status is `200`
* Payload contains `lower case html`
[PASSED]

> GET http://cs531-cs_cbrad022/a1-test/1/1.4/test%3A.html HTTP/1.1
> Host: cs531-cs_cbrad022
> Connection: close
> 

< HTTP/1.1 200 OK
< Date: Mon, 05 Dec 2022 08:00:00 GMT
< Server: calebsserver
< Content-Type: text/html
< Last-Modified: Sat, 20 Oct 2018 02:33:21 GMT
< Content-Length: 25
< ETag: "4400055101ad85035c4d0d010bf199b6"
< 
* [Payload redacted (25 bytes)]

--------------------------------------------------------------------------------
test_get_escape_escaping_character: Test whether the escaped escaping caracter in a file name is respected
* Connecting to the `cs531-cs_cbrad022:80` server
* Request data sent
* Response data read
* Response parsed
* Status is `200`
* Payload contains `Go Monarchs!`
[PASSED]

> GET http://cs531-cs_cbrad022/a1-test/1/1.4/escape%25this.html HTTP/1.1
> Host: cs531-cs_cbrad022
> Connection: close
> 

< HTTP/1.1 200 OK
< Date: Mon, 05 Dec 2022 08:00:00 GMT
< Server: calebsserver
< Content-Type: text/html
< Last-Modified: Sat, 20 Oct 2018 02:33:21 GMT
< Content-Length: 67
< ETag: "d23695deea09abedde3aaf360277a782"
< 
* [Payload redacted (67 bytes)]

--------------------------------------------------------------------------------
test_get_jpeg_image: Test whether a JPEG image returns 200 with proper Content-Length on GET
* Connecting to the `cs531-cs_cbrad022:80` server
* Request data sent
* Response data read
* Response parsed
* Status is `200`
* `Content-Length` header is present
* `Content-Length` header has value `38457`
* Payload size is `38457` bytes
[PASSED]

> GET http://cs531-cs_cbrad022/a1-test/2/0.jpeg HTTP/1.1
> Host: cs531-cs_cbrad022
> Connection: close
> 

< HTTP/1.1 200 OK
< Date: Mon, 05 Dec 2022 08:00:00 GMT
< Server: calebsserver
< Content-Type: image/jpeg
< Last-Modified: Sat, 20 Oct 2018 02:33:21 GMT
< Content-Length: 38457
< ETag: "a5ee39e4649fdd082e17b9c6a5758885"
< 
* [Payload redacted (38457 bytes)]

--------------------------------------------------------------------------------
test_get_case_sensitive_file_extension: Test whether file extensions are treated case-sensitive
* Connecting to the `cs531-cs_cbrad022:80` server
* Request data sent
* Response data read
* Response parsed
* HTTP version is `HTTP/1.1`
* Status is `404`
[PASSED]

> GET http://cs531-cs_cbrad022/a1-test/2/0.JPEG HTTP/1.1
> Host: cs531-cs_cbrad022
> Connection: close
> 

< HTTP/1.1 404 Not Found
< Date: Mon, 05 Dec 2022 08:00:00 GMT
< Server: calebsserver
< Content-Type: text/html
< Transfer-Encoding: chunked
< Connection: close
< 
* [Payload redacted (63 bytes)]

--------------------------------------------------------------------------------
test_get_empty_text_file: Test whether an empty file returns zero bytes with 200 on GET
* Connecting to the `cs531-cs_cbrad022:80` server
* Request data sent
* Response data read
* Response parsed
* Status is `200`
* `Content-Type` header is present
* `Content-Type` header begins with `text/plain`
* `Content-Length` header is present
* `Content-Length` header has value `0`
* Payload is empty
[PASSED]

> GET http://cs531-cs_cbrad022/a1-test/4/thisfileisempty.txt HTTP/1.1
> Host: cs531-cs_cbrad022
> Connection: close
> 

< HTTP/1.1 200 OK
< Date: Mon, 05 Dec 2022 08:00:00 GMT
< Server: calebsserver
< Content-Type: text/plain
< Last-Modified: Sat, 20 Oct 2018 02:33:21 GMT
< Content-Length: 0
< ETag: "d41d8cd98f00b204e9800998ecf8427e"

--------------------------------------------------------------------------------
test_get_empty_unknown_file_directory: Test whether an unknown empty file or directory returns zero bytes and a valid Content-Type with 200 on GET
* Connecting to the `cs531-cs_cbrad022:80` server
* Request data sent
* Response data read
* Response parsed
* Status is `200`
* `Content-Type` header is present
* `Content-Type` header begins with `application/octet-stream`
* `Content-Length` header is present
* `Content-Length` header has value `0`
* Payload is empty
[PASSED]

> GET http://cs531-cs_cbrad022/a1-test/4/directory3isempty HTTP/1.1
> Host: cs531-cs_cbrad022
> Connection: close
> 

< HTTP/1.1 200 OK
< Date: Mon, 05 Dec 2022 08:00:00 GMT
< Server: calebsserver
< Content-Type: application/octet-stream
< Last-Modified: Sat, 20 Oct 2018 02:33:21 GMT
< Content-Length: 0
< ETag: "d41d8cd98f00b204e9800998ecf8427e"

--------------------------------------------------------------------------------
test_get_filename_with_many_dots: Test whether file names with multiple dots return 200 on GET
* Connecting to the `cs531-cs_cbrad022:80` server
* Request data sent
* Response data read
* Response parsed
* Status is `200`
* `Content-Type` header is present
* `Content-Type` header begins with `text/xml`
[PASSED]

> GET http://cs531-cs_cbrad022/a1-test/1/1.2/arXiv.org.Idenitfy.repsonse.xml HTTP/1.1
> Host: cs531-cs_cbrad022
> Connection: close
> 

< HTTP/1.1 200 OK
< Date: Mon, 05 Dec 2022 08:00:00 GMT
< Server: calebsserver
< Content-Type: text/xml
< Last-Modified: Sat, 20 Oct 2018 02:33:21 GMT
< Content-Length: 3142
< ETag: "60757ce40ecb43052efe0f5a329a3d0d"
< 
* [Payload redacted (3142 bytes)]

--------------------------------------------------------------------------------
test_get_magic_cookie_of_a_binary_file: Test whether a GIF file contains identifying magic cookie
* Connecting to the `cs531-cs_cbrad022:80` server
* Request data sent
* Response data read
* Response parsed
* Status is `200`
* Payload begins with `GIF89a`
[PASSED]

> GET http://cs531-cs_cbrad022/a1-test/2/6.gif HTTP/1.1
> Host: cs531-cs_cbrad022
> Connection: close
> 

< HTTP/1.1 200 OK
< Date: Mon, 05 Dec 2022 08:00:00 GMT
< Server: calebsserver
< Content-Type: image/gif
< Last-Modified: Sat, 20 Oct 2018 02:33:21 GMT
< Content-Length: 49803
< ETag: "f15d0e729fffe52ad0afc2320484c553"
< 
* [Payload redacted (49803 bytes)]

--------------------------------------------------------------------------------
test_access_log_as_virtual_uri: Test whether the access log is available as a Virtual URI in the Common Log Format
* Connecting to the `cs531-cs_cbrad022:80` server
* Request data sent
* Response data read
* Response parsed
* Status is `200`
* `Content-Type` header is present
* `Content-Type` header begins with `text/plain`
* Payload is not empty
* Selected log entry `172.18.0.2 - - [05/Dec/2022:20:00:00 +0000] "GET http://cs531-cs_cbrad022/a1-test/1/1.4/test%3A.html HTTP/1.1" 200 25`
* `172.18.0.2` is a valid IP address
* `172.18.0.2` is potentially the IP address of a client
* `05/Dec/2022:20:00:00 +0000` is formatted correctly
* `200` is a valid status code
* `25` is a valid size
[PASSED]

> GET /.well-known/access.log HTTP/1.1
> Host: cs531-cs_cbrad022
> Connection: close
> 

< HTTP/1.1 200 OK
< Date: Mon, 05 Dec 2022 08:00:00 GMT
< Server: calebsserver
< Content-Type: text/plain
< Last-Modified: Mon, 05 Dec 2022 08:00:00 GMT
< Content-Length: 1687
< ETag: "5e33552a8ae8ddd4baf5cca3309bdf33"
< 
* [Payload redacted (1689 bytes)]

=================================== SUMMARY ====================================
Server: cs531-cs_cbrad022:80
Test Case Results:
PASSED: test_url_get_ok
PASSED: test_url_head_ok
PASSED: test_path_head_ok
PASSED: test_path_options_ok
PASSED: test_get_missing
PASSED: test_get_duplicate_path_prefix
PASSED: test_unsupported_version
PASSED: test_invalid_request
PASSED: test_missing_host_header
FAILED: test_post_not_implemented
PASSED: test_trace_echoback
PASSED: test_get_escaped_file_name
PASSED: test_get_escape_escaping_character
PASSED: test_get_jpeg_image
PASSED: test_get_case_sensitive_file_extension
PASSED: test_get_empty_text_file
PASSED: test_get_empty_unknown_file_directory
PASSED: test_get_filename_with_many_dots
PASSED: test_get_magic_cookie_of_a_binary_file
PASSED: test_access_log_as_virtual_uri
--------------------------------------------------------------------------------
TOTAL: 20, PASSED: 19, FAILED: 1
===============================================================================

Destroying server: cs531-cs_cbrad022
Server `cs531-cs_cbrad022` destroyed successfully.