Open ibnesayeed opened 1 year ago
================================================================================
Assignment: cs531a1
Student: Caleb Bradford <cs_cbrad022@cs.odu.edu>
Time: 20221205-193736 UTC
Repository: https://github.com/calebkbrad/calebsserver/tree/a2
Server: cs531-cs_cbrad022
================================================================================
Deploying server: cs531-cs_cbrad022
Cloning the `https://github.com/calebkbrad/calebsserver.git` repo and checking the `a2` branch/tag out
Released at: 2022-10-17T00:35:31Z
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
---> ede9ff9e643c
Step 8/13 : COPY errorpages /app/errorpages
---> Using cache
---> 80321e5b759e
Step 9/13 : COPY settings /app/settings
---> Using cache
---> e22f968bec72
Step 10/13 : RUN touch /app/access.log
---> Using cache
---> 269e4404ae04
Step 11/13 : RUN chmod a+x server.py
---> Using cache
---> 801bda62bca0
Step 12/13 : RUN pip install pyyaml
---> Using cache
---> c79ae7a8c0ef
Step 13/13 : ENTRYPOINT [ "./server.py" ]
---> Using cache
---> 9d5d7432957b
Successfully built 9d5d7432957b
Successfully tagged cs531/cs_cbrad022:a2
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 07:37:42 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 07:37:42 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 07:37:42 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 07:37:42 GMT
< Server: calebsserver
< Connection: close
< Allow: GET, HEAD, OPTIONS, TRACE
--------------------------------------------------------------------------------
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 07:37:42 GMT
< Server: calebsserver
< Connection: close
<
* [Payload redacted (95 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 07:37:42 GMT
< Server: calebsserver
< Connection: close
<
* [Payload redacted (91 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 07:37:42 GMT
< Server: calebsserver
< Connection: close
<
* [Payload redacted (73 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 07:37:42 GMT
< Server: calebsserver
< Connection: close
<
* [Payload redacted (91 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 07:37:42 GMT
< Server: calebsserver
< Connection: close
<
* [Payload redacted (91 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
* Response parsed
* Status is `501`
* `Date` header is present
* `Date` header is in the preferred RCF7231 format
[PASSED]
> POST /a1-test/ HTTP/1.1
> Host: cs531-cs_cbrad022
> Connection: close
>
< HTTP/1.1 501 Not Implemented
< Date: Mon, 05 Dec 2022 07:37:42 GMT
< Server: calebsserver
< Connection: close
<
* [Payload redacted (67 bytes)]
--------------------------------------------------------------------------------
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/1670269062`
* Payload contains `Connection: close`
[PASSED]
> TRACE /a1-test/1/1.4/ HTTP/1.1
> Host: cs531-cs_cbrad022
> User-Agent: CS531 Assignment 1 Tester/1670269062
> Connection: close
>
< HTTP/1.1 200 OK
< Date: Mon, 05 Dec 2022 07:37:42 GMT
< Server: calebsserver
< Connection: close
< Content-Type: message/http
<
* [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 07:37:42 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 07:37:42 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 07:37:42 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 07:37:42 GMT
< Server: calebsserver
< Connection: close
<
* [Payload redacted (91 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 07:37:42 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 07:37:42 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 07:37:42 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 07:37:42 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:19:37:42 +0000] "GET http://cs531-cs_cbrad022/a1-test/1/1.4/escape%25this.html HTTP/1.1" 200 67`
* `172.18.0.2` is a valid IP address
* `172.18.0.2` is potentially the IP address of a client
* `05/Dec/2022:19:37:42 +0000` is formatted correctly
* `200` is a valid status code
* `67` 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 07:37:43 GMT
< Server: calebsserver
< Content-Type: text/plain
< Last-Modified: Mon, 05 Dec 2022 07:37:43 GMT
< Content-Length: 1766
< ETag: "264b3e793ef8a9051ed657ea5327c43e"
<
* [Payload redacted (1768 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
PASSED: 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: 20, FAILED: 0
===============================================================================
Destroying server: cs531-cs_cbrad022
Server `cs531-cs_cbrad022` destroyed successfully.