================================================================================
Assignment: cs531a1
Student: Caleb Bradford <cs_cbrad022@cs.odu.edu>
Time: 20221205-193056 UTC
Repository: https://github.com/calebkbrad/calebsserver/tree/a1
Server: cs531-cs_cbrad022
================================================================================
Deploying server: cs531-cs_cbrad022
Cloning the `https://github.com/calebkbrad/calebsserver.git` repo and checking the `a1` branch/tag out
Released at: 2022-10-02T23:30:15Z
Step 1/12 : FROM python:3
---> e285995a3494
Step 2/12 : LABEL maintainer = "Caleb Bradford <@calebkbradford>"
---> Using cache
---> 74579e05b181
Step 3/12 : ENV WEBROOT="/var/www"
---> Using cache
---> d2ddd397f43b
Step 4/12 : WORKDIR ${WEBROOT}
---> Using cache
---> 5d9b75cadc40
Step 5/12 : 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/12 : WORKDIR /app
---> Using cache
---> 635268e75bbc
Step 7/12 : COPY src/server.py /app
---> Using cache
---> 8d8daec65f10
Step 8/12 : COPY settings /app/settings
---> Using cache
---> 2a71383b41a7
Step 9/12 : COPY access.log /app
---> Using cache
---> f2b19a19fb3a
Step 10/12 : RUN chmod a+x server.py
---> Using cache
---> f7a4bd28b21e
Step 11/12 : RUN pip install pyyaml
---> Using cache
---> 2c9577bc8e42
Step 12/12 : ENTRYPOINT [ "./server.py" ]
---> Using cache
---> 829c5bb75965
Successfully built 829c5bb75965
Successfully tagged cs531/cs_cbrad022:a1
Related existing container removed
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:31:04 GMT
< Server: calebsserver
< Content-Type: text/html
< Last-Modified: Sat, 20 Oct 2018 02:33:21 GMT
< Content-Length: 1936
<
* [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:31:04 GMT
< Server: calebsserver
< Content-Type: text/html
< Last-Modified: Sat, 20 Oct 2018 02:33:21 GMT
< Content-Length: 1936
--------------------------------------------------------------------------------
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:31:04 GMT
< Server: calebsserver
< Content-Type: text/html
< Last-Modified: Sat, 20 Oct 2018 02:33:21 GMT
< Content-Length: 1936
--------------------------------------------------------------------------------
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:31:04 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:31:04 GMT
< Server: calebsserver
< Connection: close
<
* [Payload redacted (29 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:31:04 GMT
< Server: calebsserver
< Connection: close
<
* [Payload redacted (25 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:31:04 GMT
< Server: calebsserver
< Connection: close
--------------------------------------------------------------------------------
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:31:04 GMT
< Server: calebsserver
< Connection: close
--------------------------------------------------------------------------------
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:31:04 GMT
< Server: calebsserver
< Connection: close
--------------------------------------------------------------------------------
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:31:04 GMT
< Server: calebsserver
< 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/1670268664`
* Payload contains `Connection: close`
[PASSED]
> TRACE /a1-test/1/1.4/ HTTP/1.1
> Host: cs531-cs_cbrad022
> User-Agent: CS531 Assignment 1 Tester/1670268664
> Connection: close
>
< HTTP/1.1 200 OK
< Date: Mon, 05 Dec 2022 07:31:04 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:31:04 GMT
< Server: calebsserver
< Content-Type: text/html
< Last-Modified: Sat, 20 Oct 2018 02:33:21 GMT
< Content-Length: 25
<
* [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:31:04 GMT
< Server: calebsserver
< Content-Type: text/html
< Last-Modified: Sat, 20 Oct 2018 02:33:21 GMT
< Content-Length: 67
<
* [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:31:04 GMT
< Server: calebsserver
< Content-Type: image/jpeg
< Last-Modified: Sat, 20 Oct 2018 02:33:21 GMT
< Content-Length: 38457
<
* [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:31:04 GMT
< Server: calebsserver
< Connection: close
<
* [Payload redacted (25 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:31:04 GMT
< Server: calebsserver
< Content-Type: text/plain
< Last-Modified: Sat, 20 Oct 2018 02:33:21 GMT
< Content-Length: 0
--------------------------------------------------------------------------------
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:31:04 GMT
< Server: calebsserver
< Content-Type: application/octet-stream
< Last-Modified: Sat, 20 Oct 2018 02:33:21 GMT
< Content-Length: 0
--------------------------------------------------------------------------------
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:31:04 GMT
< Server: calebsserver
< Content-Type: text/xml
< Last-Modified: Sat, 20 Oct 2018 02:33:21 GMT
< Content-Length: 3142
<
* [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:31:04 GMT
< Server: calebsserver
< Content-Type: image/gif
< Last-Modified: Sat, 20 Oct 2018 02:33:21 GMT
< Content-Length: 49803
<
* [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:31:04 +0000] "OPTIONS /a1-test/2/index.html HTTP/1.1" 200 1936`
* `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:31:04 +0000` is formatted correctly
* `200` is a valid status code
* `1936` 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:31:04 GMT
< Server: calebsserver
< Content-Type: text/plain
< Last-Modified: Mon, 05 Dec 2022 07:31:04 GMT
< Content-Length: 1909
<
* [Payload redacted (1911 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.================================================================================
Assignment: cs531a1
Student: Caleb Bradford <cs_cbrad022@cs.odu.edu>
Time: 20221205-193056 UTC
Repository: https://github.com/calebkbrad/calebsserver/tree/a1
Server: cs531-cs_cbrad022
================================================================================
Deploying server: cs531-cs_cbrad022
Cloning the `https://github.com/calebkbrad/calebsserver.git` repo and checking the `a1` branch/tag out
Released at: 2022-10-02T23:30:15Z
Step 1/12 : FROM python:3
---> e285995a3494
Step 2/12 : LABEL maintainer = "Caleb Bradford <@calebkbradford>"
---> Using cache
---> 74579e05b181
Step 3/12 : ENV WEBROOT="/var/www"
---> Using cache
---> d2ddd397f43b
Step 4/12 : WORKDIR ${WEBROOT}
---> Using cache
---> 5d9b75cadc40
Step 5/12 : 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/12 : WORKDIR /app
---> Using cache
---> 635268e75bbc
Step 7/12 : COPY src/server.py /app
---> Using cache
---> 8d8daec65f10
Step 8/12 : COPY settings /app/settings
---> Using cache
---> 2a71383b41a7
Step 9/12 : COPY access.log /app
---> Using cache
---> f2b19a19fb3a
Step 10/12 : RUN chmod a+x server.py
---> Using cache
---> f7a4bd28b21e
Step 11/12 : RUN pip install pyyaml
---> Using cache
---> 2c9577bc8e42
Step 12/12 : ENTRYPOINT [ "./server.py" ]
---> Using cache
---> 829c5bb75965
Successfully built 829c5bb75965
Successfully tagged cs531/cs_cbrad022:a1
Related existing container removed
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:31:04 GMT
< Server: calebsserver
< Content-Type: text/html
< Last-Modified: Sat, 20 Oct 2018 02:33:21 GMT
< Content-Length: 1936
<
* [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:31:04 GMT
< Server: calebsserver
< Content-Type: text/html
< Last-Modified: Sat, 20 Oct 2018 02:33:21 GMT
< Content-Length: 1936
--------------------------------------------------------------------------------
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:31:04 GMT
< Server: calebsserver
< Content-Type: text/html
< Last-Modified: Sat, 20 Oct 2018 02:33:21 GMT
< Content-Length: 1936
--------------------------------------------------------------------------------
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:31:04 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:31:04 GMT
< Server: calebsserver
< Connection: close
<
* [Payload redacted (29 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:31:04 GMT
< Server: calebsserver
< Connection: close
<
* [Payload redacted (25 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:31:04 GMT
< Server: calebsserver
< Connection: close
--------------------------------------------------------------------------------
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:31:04 GMT
< Server: calebsserver
< Connection: close
--------------------------------------------------------------------------------
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:31:04 GMT
< Server: calebsserver
< Connection: close
--------------------------------------------------------------------------------
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:31:04 GMT
< Server: calebsserver
< 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/1670268664`
* Payload contains `Connection: close`
[PASSED]
> TRACE /a1-test/1/1.4/ HTTP/1.1
> Host: cs531-cs_cbrad022
> User-Agent: CS531 Assignment 1 Tester/1670268664
> Connection: close
>
< HTTP/1.1 200 OK
< Date: Mon, 05 Dec 2022 07:31:04 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:31:04 GMT
< Server: calebsserver
< Content-Type: text/html
< Last-Modified: Sat, 20 Oct 2018 02:33:21 GMT
< Content-Length: 25
<
* [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:31:04 GMT
< Server: calebsserver
< Content-Type: text/html
< Last-Modified: Sat, 20 Oct 2018 02:33:21 GMT
< Content-Length: 67
<
* [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:31:04 GMT
< Server: calebsserver
< Content-Type: image/jpeg
< Last-Modified: Sat, 20 Oct 2018 02:33:21 GMT
< Content-Length: 38457
<
* [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:31:04 GMT
< Server: calebsserver
< Connection: close
<
* [Payload redacted (25 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:31:04 GMT
< Server: calebsserver
< Content-Type: text/plain
< Last-Modified: Sat, 20 Oct 2018 02:33:21 GMT
< Content-Length: 0
--------------------------------------------------------------------------------
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:31:04 GMT
< Server: calebsserver
< Content-Type: application/octet-stream
< Last-Modified: Sat, 20 Oct 2018 02:33:21 GMT
< Content-Length: 0
--------------------------------------------------------------------------------
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:31:04 GMT
< Server: calebsserver
< Content-Type: text/xml
< Last-Modified: Sat, 20 Oct 2018 02:33:21 GMT
< Content-Length: 3142
<
* [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:31:04 GMT
< Server: calebsserver
< Content-Type: image/gif
< Last-Modified: Sat, 20 Oct 2018 02:33:21 GMT
< Content-Length: 49803
<
* [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:31:04 +0000] "OPTIONS /a1-test/2/index.html HTTP/1.1" 200 1936`
* `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:31:04 +0000` is formatted correctly
* `200` is a valid status code
* `1936` 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:31:04 GMT
< Server: calebsserver
< Content-Type: text/plain
< Last-Modified: Mon, 05 Dec 2022 07:31:04 GMT
< Content-Length: 1909
<
* [Payload redacted (1911 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.