DavidBittner / http-webserver

GNU Affero General Public License v3.0
0 stars 0 forks source link

Assignment 4 Report #7

Open ibnesayeed opened 4 years ago

ibnesayeed commented 4 years ago
================================================================================
Assignment: cs531a1
Student: David Bittner <dbittner@cs.odu.edu>
Time: 20191118-165907 UTC
Repository: https://github.com/DavidBittner/http-webserver/tree/a4
Server: cs531-dbittner
================================================================================

Deploying server: cs531-dbittner

Cloning the `https://github.com/DavidBittner/http-webserver.git` repo and checking the `a4` branch/tag out
Released at: 2019-11-15T21:47:20Z
Step 1/24 : FROM rust:latest
 ---> e0566c997dc9
Step 2/24 : ENV listen_port 80
 ---> Using cache
 ---> 5e39bacdcd04
Step 3/24 : ENV server_home /home/http-server
 ---> Using cache
 ---> 3ccc8e33fae5
Step 4/24 : ENV test_url https://raw.githubusercontent.com/ibnesayeed/webserver-tester/master/sample/cs531-test-files.tar.gz
 ---> Using cache
 ---> b49b5284db15
Step 5/24 : ENV server_root /tmp
 ---> Using cache
 ---> 2a9627e17df0
Step 6/24 : RUN mkdir -p ${server_root}
 ---> Using cache
 ---> 10f3e97ed7df
Step 7/24 : ADD ${test_url} ${server_root}/test_files.tar.gz

 ---> Using cache
 ---> ab4756119791
Step 8/24 : RUN cd ${server_root} && tar -xf ${server_root}/test_files.tar.gz
 ---> Using cache
 ---> 8eab4aa558b7
Step 9/24 : RUN rm ${server_root}/test_files.tar.gz
 ---> Using cache
 ---> d6a76af05dfa
Step 10/24 : RUN apt -y update
 ---> Using cache
 ---> 1466fb2cde24
Step 11/24 : RUN apt -y install tree
 ---> Using cache
 ---> a95b6ac60f48
Step 12/24 : RUN tree ${server_root}
 ---> Using cache
 ---> f747aebf5dba
Step 13/24 : EXPOSE  ${listen_port}
 ---> Using cache
 ---> ab5697bfcca3
Step 14/24 : WORKDIR ${server_home}
 ---> Using cache
 ---> 1c3e63572815
Step 15/24 : RUN mkdir -p ${server_home}
 ---> Using cache
 ---> 8e14e771eec4
Step 16/24 : COPY src ${server_home}/src
 ---> Using cache
 ---> 8abb6a2af846
Step 17/24 : COPY templates ${server_home}/templates
 ---> Using cache
 ---> 21cb359f36ed
Step 18/24 : COPY Cargo.toml ${server_home}/
 ---> Using cache
 ---> b87c02fc0e71
Step 19/24 : COPY config.yml ${server_home}/
 ---> Using cache
 ---> 29c129aa7144
Step 20/24 : RUN cd ${server_home}
 ---> Using cache
 ---> dd210889c6cc
Step 21/24 : RUN cargo build --release
 ---> Using cache
 ---> 70681bf957dc
Step 22/24 : RUN echo "#!/bin/sh \n RUST_BACKTRACE=full SERV_LOG=trace SERV_ROOT="${server_root}" SERV_PORT="${listen_port}" ./target/release/http-webserver" > ${server_home}/start.sh
 ---> Using cache
 ---> 658081d38a5f
Step 23/24 : RUN chmod uo+x ${server_home}/start.sh
 ---> Using cache
 ---> c5e1b28a4e66
Step 24/24 : ENTRYPOINT ["/home/http-server/start.sh"]
 ---> Using cache
 ---> cf999fe7a9fe
Successfully built cf999fe7a9fe
Successfully tagged cs531/dbittner:a4

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

Testing server: cs531-dbittner against cs531a1 test suite

Testing cs531-dbittner: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-dbittner: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-dbittner/a1-test/2/index.html HTTP/1.1
> Host: cs531-dbittner
> Connection: close
> 

< HTTP/1.1 200 Ok
< Date: Mon, 18 Nov 2019 16:59:15 GMT
< Content-Type: text/html
< Content-Language: en
< Etag: "493d0064cfd45fef"
< Server: Ruserv-1.0.0
< Last-Modified: Sat, 20 Oct 2018 02:33:21 GMT
< Content-Length: 1936
< Connection: close
< 
* [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-dbittner: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-dbittner/a1-test/2/index.html HTTP/1.1
> Host: cs531-dbittner
> Connection: close
> 

< HTTP/1.1 200 Ok
< Last-Modified: Sat, 20 Oct 2018 02:33:21 GMT
< Connection: close
< Date: Mon, 18 Nov 2019 16:59:15 GMT
< Content-Type: text/html
< Content-Language: en
< Content-Length: 1936
< Etag: "493d0064cfd45fef"
< Server: Ruserv-1.0.0

--------------------------------------------------------------------------------
test_path_head_ok: Test whether the relative path of the assignment 1 directory returns 200 on HEAD
* Connecting to the `cs531-dbittner: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-dbittner
> Connection: close
> 

< HTTP/1.1 200 Ok
< Connection: close
< Server: Ruserv-1.0.0
< Etag: "493d0064cfd45fef"
< Content-Length: 1936
< Content-Type: text/html
< Date: Mon, 18 Nov 2019 16:59:15 GMT
< Content-Language: en
< Last-Modified: Sat, 20 Oct 2018 02:33:21 GMT

--------------------------------------------------------------------------------
test_path_options_ok: Test whether the relative path of the assignment 1 directory returns 200 on OPTIONS
* Connecting to the `cs531-dbittner: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-dbittner
> Connection: close
> 

< HTTP/1.1 200 Ok
< Allow: POST,GET,TRACE,HEAD
< Server: Ruserv-1.0.0
< Date: Mon, 18 Nov 2019 16:59:15 GMT
< Connection: close

--------------------------------------------------------------------------------
test_get_missing: Test whether a non-existing path returns 404 on GET
* Connecting to the `cs531-dbittner: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-dbittner
> Connection: close
> 

< HTTP/1.1 404 Not Found
< Content-Type: text/html
< Transfer-Encoding: chunked
< Connection: close
< Date: Mon, 18 Nov 2019 16:59:15 GMT
< Server: Ruserv-1.0.0
< 
* [Payload redacted (964 bytes)]

--------------------------------------------------------------------------------
test_get_duplicate_path_prefix: Test tight path prefix checking
* Connecting to the `cs531-dbittner: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-dbittner
> Connection: close
> 

< HTTP/1.1 404 Not Found
< Content-Type: text/html
< Transfer-Encoding: chunked
< Connection: close
< Server: Ruserv-1.0.0
< Date: Mon, 18 Nov 2019 16:59:15 GMT
< 
* [Payload redacted (964 bytes)]

--------------------------------------------------------------------------------
test_unsupported_version: Test whether a request with unsupported version returns 505
* Connecting to the `cs531-dbittner: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-dbittner
> Connection: close
> 

< HTTP/1.1 505 HTTP Version Not Supported
< Server: Ruserv-1.0.0
< Date: Mon, 18 Nov 2019 16:59:15 GMT
< Content-Type: text/html
< Transfer-Encoding: chunked
< Connection: close
< 
* [Payload redacted (987 bytes)]

--------------------------------------------------------------------------------
test_invalid_request: Test whether an invalid request returns 400
* Connecting to the `cs531-dbittner: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
< Server: Ruserv-1.0.0
< Date: Mon, 18 Nov 2019 16:59:15 GMT
< Content-Type: text/html
< Transfer-Encoding: chunked
< Connection: close
< 
* [Payload redacted (965 bytes)]

--------------------------------------------------------------------------------
test_missing_host_header: Test whether missing Host header in a request returns 400
* Connecting to the `cs531-dbittner: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
< Server: Ruserv-1.0.0
< Date: Mon, 18 Nov 2019 16:59:15 GMT
< Connection: close
< Content-Type: text/html
< Transfer-Encoding: chunked
< 
* [Payload redacted (965 bytes)]

--------------------------------------------------------------------------------
test_post_not_implemented: Test whether the assignment 1 returns 501 on POST
* Connecting to the `cs531-dbittner: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-dbittner
> Connection: close
> 

< HTTP/1.1 501 Not Implemented
< Server: Ruserv-1.0.0
< Content-Type: text/html
< Connection: close
< Transfer-Encoding: chunked
< Date: Mon, 18 Nov 2019 16:59:15 GMT
< 
* [Payload redacted (984 bytes)]

--------------------------------------------------------------------------------
test_trace_echoback: Test whether the server echoes back the request on TRACE
* Connecting to the `cs531-dbittner: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/1574096355`
* Payload contains `Connection: close`
[PASSED]

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

< HTTP/1.1 200 Ok
< Server: Ruserv-1.0.0
< Content-Length: 123
< Content-Type: message/http
< Date: Mon, 18 Nov 2019 16:59:15 GMT
< Connection: close
< 
* [Payload redacted (123 bytes)]

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

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

< HTTP/1.1 200 Ok
< Content-Language: en
< Connection: close
< Last-Modified: Sat, 20 Oct 2018 02:33:21 GMT
< Content-Length: 25
< Etag: "f82dbbf9bfe14679"
< Date: Mon, 18 Nov 2019 16:59:15 GMT
< Content-Type: text/html
< Server: Ruserv-1.0.0
< 
* [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-dbittner:80` server
* Request data sent
* Response data read
* Response parsed
* Status is `200`
* Payload contains `Go Monarchs!`
[PASSED]

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

< HTTP/1.1 200 Ok
< Content-Length: 67
< Date: Mon, 18 Nov 2019 16:59:15 GMT
< Last-Modified: Sat, 20 Oct 2018 02:33:21 GMT
< Content-Language: en
< Etag: "3ce5436cc27cc32e"
< Content-Type: text/html
< Server: Ruserv-1.0.0
< Connection: close
< 
* [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-dbittner: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-dbittner/a1-test/2/0.jpeg HTTP/1.1
> Host: cs531-dbittner
> Connection: close
> 

< HTTP/1.1 200 Ok
< Content-Length: 38457
< Date: Mon, 18 Nov 2019 16:59:16 GMT
< Content-Type: image/jpeg
< Connection: close
< Server: Ruserv-1.0.0
< Content-Language: en
< Last-Modified: Sat, 20 Oct 2018 02:33:21 GMT
< Etag: "57a5f852bc0b9434"
< 
* [Payload redacted (38457 bytes)]

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

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

< HTTP/1.1 404 Not Found
< Transfer-Encoding: chunked
< Server: Ruserv-1.0.0
< Connection: close
< Date: Mon, 18 Nov 2019 16:59:16 GMT
< Content-Type: text/html
< 
* [Payload redacted (964 bytes)]

--------------------------------------------------------------------------------
test_get_empty_text_file: Test whether an empty file returns zero bytes with 200 on GET
* Connecting to the `cs531-dbittner: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-dbittner/a1-test/4/thisfileisempty.txt HTTP/1.1
> Host: cs531-dbittner
> Connection: close
> 

< HTTP/1.1 200 Ok
< Content-Type: text/plain
< Content-Length: 0
< Date: Mon, 18 Nov 2019 16:59:16 GMT
< Server: Ruserv-1.0.0
< Etag: "dfb266e397bebb2b"
< Connection: close
< Content-Language: en
< Last-Modified: Sat, 20 Oct 2018 02:33:21 GMT

--------------------------------------------------------------------------------
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-dbittner: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-dbittner/a1-test/4/directory3isempty HTTP/1.1
> Host: cs531-dbittner
> Connection: close
> 

< HTTP/1.1 200 Ok
< Date: Mon, 18 Nov 2019 16:59:16 GMT
< Connection: close
< Server: Ruserv-1.0.0
< Content-Length: 0
< Content-Type: application/octet-stream
< Etag: "8f3ee7a428802647"
< Content-Language: en
< Last-Modified: Sat, 20 Oct 2018 02:33:21 GMT

--------------------------------------------------------------------------------
test_get_filename_with_many_dots: Test whether file names with multiple dots return 200 on GET
* Connecting to the `cs531-dbittner: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-dbittner/a1-test/1/1.2/arXiv.org.Idenitfy.repsonse.xml HTTP/1.1
> Host: cs531-dbittner
> Connection: close
> 

< HTTP/1.1 200 Ok
< Server: Ruserv-1.0.0
< Content-Length: 3142
< Etag: "151b813fb4abee46"
< Content-Type: text/xml
< Date: Mon, 18 Nov 2019 16:59:16 GMT
< Last-Modified: Sat, 20 Oct 2018 02:33:21 GMT
< Connection: close
< Content-Language: en
< 
* [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-dbittner:80` server
* Request data sent
* Response data read
* Response parsed
* Status is `200`
* Payload begins with `GIF89a`
[PASSED]

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

< HTTP/1.1 200 Ok
< Connection: close
< Server: Ruserv-1.0.0
< Etag: "b3be3893b0adb6f3"
< Content-Length: 49803
< Last-Modified: Sat, 20 Oct 2018 02:33:21 GMT
< Content-Language: en
< Date: Mon, 18 Nov 2019 16:59:16 GMT
< Content-Type: image/gif
< 
* [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-dbittner: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.22.0.2 - - [18/Nov/2019:16:59:16 +0000] "GET /a1-test/2/0.JPEG HTTP/1.1" 404 0`
* `172.22.0.2` is a valid IP address
* `172.22.0.2` is potentially the IP address of a client
* `18/Nov/2019:16:59:16 +0000` is formatted correctly
* `404` is a valid status code
* `0` is a valid size
[PASSED]

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

< HTTP/1.1 200 Ok
< Server: Ruserv-1.0.0
< Content-Type: text/plain
< Date: Mon, 18 Nov 2019 16:59:16 GMT
< Content-Length: 1515
< Connection: close
< 
* [Payload redacted (1515 bytes)]

=================================== SUMMARY ====================================
Server: cs531-dbittner: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-dbittner
Server `cs531-dbittner` destroyed successfully.
================================================================================
Assignment: cs531a2
Student: David Bittner <dbittner@cs.odu.edu>
Time: 20191118-170511 UTC
Repository: https://github.com/DavidBittner/http-webserver/tree/a4
Server: cs531-dbittner
================================================================================

Deploying server: cs531-dbittner

Cloning the `https://github.com/DavidBittner/http-webserver.git` repo and checking the `a4` branch/tag out
Released at: 2019-11-15T21:47:20Z
Step 1/24 : FROM rust:latest
 ---> e0566c997dc9
Step 2/24 : ENV listen_port 80
 ---> Using cache
 ---> 5e39bacdcd04
Step 3/24 : ENV server_home /home/http-server
 ---> Using cache
 ---> 3ccc8e33fae5
Step 4/24 : ENV test_url https://raw.githubusercontent.com/ibnesayeed/webserver-tester/master/sample/cs531-test-files.tar.gz
 ---> Using cache
 ---> b49b5284db15
Step 5/24 : ENV server_root /tmp
 ---> Using cache
 ---> 2a9627e17df0
Step 6/24 : RUN mkdir -p ${server_root}
 ---> Using cache
 ---> 10f3e97ed7df
Step 7/24 : ADD ${test_url} ${server_root}/test_files.tar.gz

 ---> Using cache
 ---> ab4756119791
Step 8/24 : RUN cd ${server_root} && tar -xf ${server_root}/test_files.tar.gz
 ---> Using cache
 ---> 8eab4aa558b7
Step 9/24 : RUN rm ${server_root}/test_files.tar.gz
 ---> Using cache
 ---> d6a76af05dfa
Step 10/24 : RUN apt -y update
 ---> Using cache
 ---> 1466fb2cde24
Step 11/24 : RUN apt -y install tree
 ---> Using cache
 ---> a95b6ac60f48
Step 12/24 : RUN tree ${server_root}
 ---> Using cache
 ---> f747aebf5dba
Step 13/24 : EXPOSE  ${listen_port}
 ---> Using cache
 ---> ab5697bfcca3
Step 14/24 : WORKDIR ${server_home}
 ---> Using cache
 ---> 1c3e63572815
Step 15/24 : RUN mkdir -p ${server_home}
 ---> Using cache
 ---> 8e14e771eec4
Step 16/24 : COPY src ${server_home}/src
 ---> Using cache
 ---> 8abb6a2af846
Step 17/24 : COPY templates ${server_home}/templates
 ---> Using cache
 ---> 21cb359f36ed
Step 18/24 : COPY Cargo.toml ${server_home}/
 ---> Using cache
 ---> b87c02fc0e71
Step 19/24 : COPY config.yml ${server_home}/
 ---> Using cache
 ---> 29c129aa7144
Step 20/24 : RUN cd ${server_home}
 ---> Using cache
 ---> dd210889c6cc
Step 21/24 : RUN cargo build --release
 ---> Using cache
 ---> 70681bf957dc
Step 22/24 : RUN echo "#!/bin/sh \n RUST_BACKTRACE=full SERV_LOG=trace SERV_ROOT="${server_root}" SERV_PORT="${listen_port}" ./target/release/http-webserver" > ${server_home}/start.sh
 ---> Using cache
 ---> 658081d38a5f
Step 23/24 : RUN chmod uo+x ${server_home}/start.sh
 ---> Using cache
 ---> c5e1b28a4e66
Step 24/24 : ENTRYPOINT ["/home/http-server/start.sh"]
 ---> Using cache
 ---> cf999fe7a9fe
Successfully built cf999fe7a9fe
Successfully tagged cs531/dbittner:a4

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

Testing server: cs531-dbittner against cs531a2 test suite

Testing cs531-dbittner:80
--------------------------------------------------------------------------------
test_get_directory_listing: Test whether a2-test directory root returns directory listing
* Connecting to the `cs531-dbittner: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-dbittner/a2-test/ HTTP/1.1
> Host: cs531-dbittner
> Connection: close
> 

< HTTP/1.1 200 Ok
< Date: Mon, 18 Nov 2019 17:05:22 GMT
< Connection: close
< Etag: "55d7f06c6814fb5e"
< Server: Ruserv-1.0.0
< Content-Type: text/html
< Transfer-Encoding: chunked
< 
* [Payload redacted (4844 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-dbittner: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-dbittner/a2-test/2 HTTP/1.1
> Host: cs531-dbittner
> Connection: close
> 

< HTTP/1.1 301 Moved Permanently
< Date: Mon, 18 Nov 2019 17:05:22 GMT
< Content-Type: text/html
< Transfer-Encoding: chunked
< Connection: close
< Server: Ruserv-1.0.0
< Location: /a2-test/2/
< 
* [Payload redacted (1058 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-dbittner: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-dbittner
> Connection: close
> 

< HTTP/1.1 301 Moved Permanently
< Location: /a2-test/1/
< Content-Type: text/html
< Transfer-Encoding: chunked
< Server: Ruserv-1.0.0
< Date: Mon, 18 Nov 2019 17:05:22 GMT
< Connection: close
< 
* [Payload redacted (1058 bytes)]

--------------------------------------------------------------------------------
test_get_default_index_file: Test whether default index.html is returned instead of directory listing
* Connecting to the `cs531-dbittner: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-dbittner/a2-test/2/ HTTP/1.1
> Host: cs531-dbittner
> Connection: close
> 

< HTTP/1.1 200 Ok
< Content-Language: en
< Etag: "17f188ad483efa1b"
< Date: Mon, 18 Nov 2019 17:05:22 GMT
< Content-Length: 1936
< Connection: close
< Content-Type: text/html
< Server: Ruserv-1.0.0
< Last-Modified: Sat, 20 Oct 2018 02:33:21 GMT
< 
* [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-dbittner: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-dbittner
> Connection: close
> 

< HTTP/1.1 302 Found
< Server: Ruserv-1.0.0
< Content-Type: text/html
< Transfer-Encoding: chunked
< Connection: close
< Location: /a2-test/1/1.1/assignment1.ppt
< Date: Mon, 18 Nov 2019 17:05:22 GMT

--------------------------------------------------------------------------------
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-dbittner: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-dbittner
> Connection: close
> 

< HTTP/1.1 302 Found
< Transfer-Encoding: chunked
< Connection: close
< Date: Mon, 18 Nov 2019 17:05:22 GMT
< Location: /a2-test/galaxie.html
< Server: Ruserv-1.0.0
< Content-Type: text/html

--------------------------------------------------------------------------------
test_dont_redirect_target_file: Test whether the target of the configured redirect returns 200 OK
* Connecting to the `cs531-dbittner: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-dbittner
> Connection: close
> 

< HTTP/1.1 200 Ok
< Content-Type: text/html
< Content-Language: en
< Server: Ruserv-1.0.0
< Last-Modified: Sat, 20 Oct 2018 03:44:27 GMT
< Connection: close
< Date: Mon, 18 Nov 2019 17:05:22 GMT
< Etag: "21d65da15d0f407a"
< Content-Length: 96

--------------------------------------------------------------------------------
test_conditional_head_fresh: Test whether conditional HEAD of a fresh file returns 304 Not Modified
* Connecting to the `cs531-dbittner:80` server
* Request data sent
* Response data read
* Response parsed
* Status is `304`
* Payload is empty
[PASSED]

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

< HTTP/1.1 304 Not Modified
< Date: Mon, 18 Nov 2019 17:05:22 GMT
< Connection: close
< Location: a2-test/2/fairlane.html
< Server: Ruserv-1.0.0

--------------------------------------------------------------------------------
test_conditional_head_stale: Test whether conditional HEAD of a stale file returns 200 OK
* Connecting to the `cs531-dbittner: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-dbittner
> If-Modified-Since: Sat, 20 Oct 2018 02:33:20 GMT
> Connection: close
> 

< HTTP/1.1 200 Ok
< Etag: "e8f3fc276449d5c5"
< Server: Ruserv-1.0.0
< Content-Type: text/html
< Date: Mon, 18 Nov 2019 17:05:22 GMT
< Content-Language: en
< Connection: close
< Content-Length: 1936
< Last-Modified: Sat, 20 Oct 2018 02:33:21 GMT

--------------------------------------------------------------------------------
test_conditional_head_invalid_datetime: Test whether conditional HEAD with invalid datetime returns 200 OK
* Connecting to the `cs531-dbittner: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-dbittner
> If-Modified-Since: who-doesn't-want-a-fairlane?
> Connection: close
> 

< HTTP/1.1 200 Ok
< Last-Modified: Sat, 20 Oct 2018 02:33:21 GMT
< Content-Length: 1936
< Content-Type: text/html
< Connection: close
< Etag: "e8f3fc276449d5c5"
< Server: Ruserv-1.0.0
< Content-Language: en
< Date: Mon, 18 Nov 2019 17:05:22 GMT

--------------------------------------------------------------------------------
test_conditional_head_unsupported_datetime_format: Test whether conditional HEAD with unsupported datetime format returns 200 OK
* Connecting to the `cs531-dbittner: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-dbittner
> If-Modified-Since: 2018-10-20 02:33:21.304307000 -0000
> Connection: close
> 

< HTTP/1.1 200 Ok
< Connection: close
< Content-Length: 1936
< Last-Modified: Sat, 20 Oct 2018 02:33:21 GMT
< Date: Mon, 18 Nov 2019 17:05:22 GMT
< Server: Ruserv-1.0.0
< Content-Type: text/html
< Etag: "e8f3fc276449d5c5"
< Content-Language: en

--------------------------------------------------------------------------------
test_include_etag: Test whether the HEAD response contains an ETag
* Connecting to the `cs531-dbittner: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 `"e8f3fc276449d5c5"`
[PASSED]

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

< HTTP/1.1 200 Ok
< Content-Length: 1936
< Content-Language: en
< Last-Modified: Sat, 20 Oct 2018 02:33:21 GMT
< Content-Type: text/html
< Etag: "e8f3fc276449d5c5"
< Server: Ruserv-1.0.0
< Connection: close
< Date: Mon, 18 Nov 2019 17:05:22 GMT

--------------------------------------------------------------------------------
test_valid_etag_ok: Test whether a valid ETag returns 200 OK
* Connecting to the `cs531-dbittner: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-dbittner
> If-Match: "e8f3fc276449d5c5"
> Connection: close
> 

< HTTP/1.1 200 Ok
< Content-Type: text/html
< Connection: close
< Etag: "e8f3fc276449d5c5"
< Last-Modified: Sat, 20 Oct 2018 02:33:21 GMT
< Content-Length: 1936
< Date: Mon, 18 Nov 2019 17:05:22 GMT
< Content-Language: en
< Server: Ruserv-1.0.0
< 
* [Payload redacted (1936 bytes)]

--------------------------------------------------------------------------------
test_etag_if_match_failure: Test whether a random ETag returns 412 Precondition Failed
* Connecting to the `cs531-dbittner: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-dbittner
> If-Match: "203948kjaldsf002"
> Connection: close
> 

< HTTP/1.1 412 Precondition Failed
< Server: Ruserv-1.0.0
< Transfer-Encoding: chunked
< Connection: close
< Date: Mon, 18 Nov 2019 17:05:22 GMT
< Content-Type: text/html
< 
* [Payload redacted (969 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-dbittner: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-dbittner
> 
> HEAD /a2-test/2/index.html HTTP/1.1
> Host: cs531-dbittner
> 

< HTTP/1.1 200 Ok
< Content-Language: en
< Last-Modified: Sat, 20 Oct 2018 02:33:21 GMT
< Content-Length: 1936
< Connection: long-lived
< Date: Mon, 18 Nov 2019 17:05:22 GMT
< Server: Ruserv-1.0.0
< Etag: "17f188ad483efa1b"
< Content-Type: text/html
< 
< HTTP/1.1 408 Request Timeout
< Server: Ruserv-1.0.0
< Transfer-Encoding: chunked
< Connection: close
< Date: Mon, 18 Nov 2019 17:05:27 GMT
< Content-Type: text/html
< 
* [Payload redacted (954 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-dbittner: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-dbittner
> Connection: keep-alive
> 
> HEAD /a2-test/2/index.html HTTP/1.1
> Host: cs531-dbittner
> Connection: keep-alive
> 

< HTTP/1.1 200 Ok
< Content-Type: text/html
< Content-Length: 1936
< Connection: keep-alive
< Etag: "17f188ad483efa1b"
< Last-Modified: Sat, 20 Oct 2018 02:33:21 GMT
< Content-Language: en
< Server: Ruserv-1.0.0
< Date: Mon, 18 Nov 2019 17:05:28 GMT
< 
< HTTP/1.1 408 Request Timeout
< Date: Mon, 18 Nov 2019 17:05:33 GMT
< Server: Ruserv-1.0.0
< Content-Type: text/html
< Transfer-Encoding: chunked
< Connection: close
< 
* [Payload redacted (954 bytes)]

--------------------------------------------------------------------------------
test_trace_unnecessary_conditionals: Test whether many unnecessary conditionals are not processed
* Connecting to the `cs531-dbittner: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-dbittner
> 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
< Content-Type: message/http
< Server: Ruserv-1.0.0
< Date: Mon, 18 Nov 2019 17:05:35 GMT
< Content-Length: 249
< Connection: close
< 
* [Payload redacted (249 bytes)]

--------------------------------------------------------------------------------
test_pipeline_requests: Test whether multiple pipelined requests are processed and returned in the same order
* Connecting to the `cs531-dbittner: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-dbittner
> 
> HEAD /a2-test/2/index.html HTTP/1.1
> Host: cs531-dbittner
> 
> GET /a2-test/ HTTP/1.1
> Host: cs531-dbittner
> Connection: close
> 

< HTTP/1.1 200 Ok
< Connection: long-lived
< Date: Mon, 18 Nov 2019 17:05:35 GMT
< Server: Ruserv-1.0.0
< Content-Type: text/html
< Etag: "55d7f06c6814fb5e"
< Transfer-Encoding: chunked
< 
< HTTP/1.1 200 Ok
< Date: Mon, 18 Nov 2019 17:05:35 GMT
< Content-Length: 1936
< Etag: "17f188ad483efa1b"
< Content-Language: en
< Server: Ruserv-1.0.0
< Connection: long-lived
< Content-Type: text/html
< Last-Modified: Sat, 20 Oct 2018 02:33:21 GMT
< 
< HTTP/1.1 200 Ok
< Transfer-Encoding: chunked
< Etag: "55d7f06c6814fb5e"
< Content-Type: text/html
< Connection: close
< Date: Mon, 18 Nov 2019 17:05:35 GMT
< Server: Ruserv-1.0.0
< 
* [Payload redacted (4844 bytes)]

--------------------------------------------------------------------------------
test_long_lived_connection: Test whether the socket connection is kept alive to process multiple requests successively
* Connecting to the `cs531-dbittner: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-dbittner
> 
> HEAD /a2-test/2/index.html HTTP/1.1
> Host: cs531-dbittner
> 
> GET /a2-test/ HTTP/1.1
> Host: cs531-dbittner
> Connection: close
> 

< HTTP/1.1 200 Ok
< Content-Type: text/html
< Etag: "55d7f06c6814fb5e"
< Connection: long-lived
< Transfer-Encoding: chunked
< Date: Mon, 18 Nov 2019 17:05:35 GMT
< Server: Ruserv-1.0.0
< 
< HTTP/1.1 200 Ok
< Content-Length: 1936
< Connection: long-lived
< Content-Type: text/html
< Content-Language: en
< Etag: "17f188ad483efa1b"
< Last-Modified: Sat, 20 Oct 2018 02:33:21 GMT
< Server: Ruserv-1.0.0
< Date: Mon, 18 Nov 2019 17:05:35 GMT
< 
< HTTP/1.1 200 Ok
< Etag: "55d7f06c6814fb5e"
< Connection: close
< Content-Type: text/html
< Date: Mon, 18 Nov 2019 17:05:36 GMT
< Server: Ruserv-1.0.0
< Transfer-Encoding: chunked
< 
* [Payload redacted (4844 bytes)]

=================================== SUMMARY ====================================
Server: cs531-dbittner: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
PASSED: 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: 19, FAILED: 0
===============================================================================

Destroying server: cs531-dbittner
Server `cs531-dbittner` destroyed successfully.
================================================================================
Assignment: cs531a3
Student: David Bittner <dbittner@cs.odu.edu>
Time: 20191118-171357 UTC
Repository: https://github.com/DavidBittner/http-webserver/tree/a4
Server: cs531-dbittner
================================================================================

Deploying server: cs531-dbittner

Cloning the `https://github.com/DavidBittner/http-webserver.git` repo and checking the `a4` branch/tag out
Released at: 2019-11-15T21:47:20Z
Step 1/24 : FROM rust:latest
 ---> e0566c997dc9
Step 2/24 : ENV listen_port 80
 ---> Using cache
 ---> 5e39bacdcd04
Step 3/24 : ENV server_home /home/http-server
 ---> Using cache
 ---> 3ccc8e33fae5
Step 4/24 : ENV test_url https://raw.githubusercontent.com/ibnesayeed/webserver-tester/master/sample/cs531-test-files.tar.gz
 ---> Using cache
 ---> b49b5284db15
Step 5/24 : ENV server_root /tmp
 ---> Using cache
 ---> 2a9627e17df0
Step 6/24 : RUN mkdir -p ${server_root}
 ---> Using cache
 ---> 10f3e97ed7df
Step 7/24 : ADD ${test_url} ${server_root}/test_files.tar.gz

 ---> Using cache
 ---> ab4756119791
Step 8/24 : RUN cd ${server_root} && tar -xf ${server_root}/test_files.tar.gz
 ---> Using cache
 ---> 8eab4aa558b7
Step 9/24 : RUN rm ${server_root}/test_files.tar.gz
 ---> Using cache
 ---> d6a76af05dfa
Step 10/24 : RUN apt -y update
 ---> Using cache
 ---> 1466fb2cde24
Step 11/24 : RUN apt -y install tree
 ---> Using cache
 ---> a95b6ac60f48
Step 12/24 : RUN tree ${server_root}
 ---> Using cache
 ---> f747aebf5dba
Step 13/24 : EXPOSE  ${listen_port}
 ---> Using cache
 ---> ab5697bfcca3
Step 14/24 : WORKDIR ${server_home}
 ---> Using cache
 ---> 1c3e63572815
Step 15/24 : RUN mkdir -p ${server_home}
 ---> Using cache
 ---> 8e14e771eec4
Step 16/24 : COPY src ${server_home}/src
 ---> Using cache
 ---> 8abb6a2af846
Step 17/24 : COPY templates ${server_home}/templates
 ---> Using cache
 ---> 21cb359f36ed
Step 18/24 : COPY Cargo.toml ${server_home}/
 ---> Using cache
 ---> b87c02fc0e71
Step 19/24 : COPY config.yml ${server_home}/
 ---> Using cache
 ---> 29c129aa7144
Step 20/24 : RUN cd ${server_home}
 ---> Using cache
 ---> dd210889c6cc
Step 21/24 : RUN cargo build --release
 ---> Using cache
 ---> 70681bf957dc
Step 22/24 : RUN echo "#!/bin/sh \n RUST_BACKTRACE=full SERV_LOG=trace SERV_ROOT="${server_root}" SERV_PORT="${listen_port}" ./target/release/http-webserver" > ${server_home}/start.sh
 ---> Using cache
 ---> 658081d38a5f
Step 23/24 : RUN chmod uo+x ${server_home}/start.sh
 ---> Using cache
 ---> c5e1b28a4e66
Step 24/24 : ENTRYPOINT ["/home/http-server/start.sh"]
 ---> Using cache
 ---> cf999fe7a9fe
Successfully built cf999fe7a9fe
Successfully tagged cs531/dbittner:a4

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

Testing server: cs531-dbittner against cs531a3 test suite

Testing cs531-dbittner: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-dbittner: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-dbittner/a3-test/fairlane.txt HTTP/1.1
> Host: cs531-dbittner:80
> User-Agent: CS531 Assignment 3 Tester/1574097246
> Connection: close
> 

< HTTP/1.1 200 Ok
< Content-Length: 193
< Server: Ruserv-1.0.0
< Date: Mon, 18 Nov 2019 17:14:06 GMT
< Last-Modified: Sat, 03 Nov 2018 14:10:11 GMT
< Content-Type: text/plain
< Content-Language: en
< Etag: "6b3ecc0295aadcca"
< Connection: close
< 
* [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-dbittner: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-dbittner/a3-test/index.html.es HTTP/1.1
> Host: cs531-dbittner:80
> User-Agent: CS531 Assignment 3 Tester/1574097246
> Referer: http://cs531-dbittner/a3-test/index.html
> Range: bytes=0-99
> Connection: close
> 

< HTTP/1.1 206 Partial Content
< Content-Type: text/html
< Content-Length: 100
< Server: Ruserv-1.0.0
< Date: Mon, 18 Nov 2019 17:14:06 GMT
< Content-Range: bytes 0-99/7643
< Content-Language: es
< Connection: close
< 
* [Payload redacted (100 bytes)]

--------------------------------------------------------------------------------
test_chunked_404: Test whether a 404 Not Found page returns chunked encoded HTML
* Connecting to the `cs531-dbittner: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-dbittner:80
> User-Agent: CS531 Assignment 3 Tester/1574097246
> Connection: close
> 

< HTTP/1.1 404 Not Found
< Date: Mon, 18 Nov 2019 17:14:06 GMT
< Server: Ruserv-1.0.0
< Content-Type: text/html
< Transfer-Encoding: chunked
< Connection: close
< 
* [Payload redacted (964 bytes)]

--------------------------------------------------------------------------------
test_conditional_head_image_fresh: Test whether conditional HEAD of a fresh image file returns 304 Not Modified
* Connecting to the `cs531-dbittner:80` server
* Request data sent
* Response data read
* Response parsed
* Status is `304`
* Payload is empty
[PASSED]

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

< HTTP/1.1 304 Not Modified
< Date: Mon, 18 Nov 2019 17:14:06 GMT
< Location: a3-test/fairlane.gif
< Server: Ruserv-1.0.0
< Connection: close

--------------------------------------------------------------------------------
test_conditional_head_image_stale: Test whether conditional HEAD of a stale image file returns 200 OK
* Connecting to the `cs531-dbittner: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-dbittner
> If-Modified-Since: Sat, 27 Oct 2018 20:46:09 GMT
> Connection: close
> 

< HTTP/1.1 200 Ok
< Last-Modified: Sat, 03 Nov 2018 14:10:11 GMT
< Etag: "ce8f440257619dd9"
< Content-Length: 49803
< Date: Mon, 18 Nov 2019 17:14:06 GMT
< Content-Language: en
< Server: Ruserv-1.0.0
< Content-Type: image/gif
< Connection: close

--------------------------------------------------------------------------------
test_no_accept_header_multiple_choices: Test whether missing Accept header yields multiple choices
* Connecting to the `cs531-dbittner: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-dbittner
> Connection: close
> 

< HTTP/1.1 300 Multiple Choice
< Alternates: {"fairlane.gif" 0 {type image/gif} {language en}},{"fairlane.jpeg" 0 {type image/jpeg} {language en}},{"fairlane.png" 0 {type image/png} {language en}},{"fairlane.txt" 0 {type text/plain} {language en}}
< Transfer-Encoding: chunked
< Date: Mon, 18 Nov 2019 17:14:06 GMT
< Server: Ruserv-1.0.0
< Content-Type: text/html
< 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-dbittner: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-dbittner:80
> Connection: close
> 

< HTTP/1.1 300 Multiple Choice
< Server: Ruserv-1.0.0
< Content-Type: text/html
< Date: Mon, 18 Nov 2019 17:14:06 GMT
< Alternates: {"fairlane.gif" 1 {type image/gif} {language en}},{"fairlane.jpeg" 1 {type image/jpeg} {language en}},{"fairlane.png" 1 {type image/png} {language en}}
< Transfer-Encoding: chunked
< Connection: close
< 
* [Payload redacted (969 bytes)]

--------------------------------------------------------------------------------
test_accept_header_png_ok: Test whether an Accept header with unique qvalue returns a PNG
* Connecting to the `cs531-dbittner:80` server
* Request data sent
* Response data read
* Response parsed
* Status is `200`
* `Content-Type` header is present
* `Content-Type` header begins with `image/png`
* `Content-Length` header is present
* `Content-Length` header has value `98203`
* Payload is empty
[PASSED]

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

< HTTP/1.1 200 Ok
< Etag: "dca5f998f9cf717"
< Content-Length: 98203
< Content-Type: image/png
< Date: Mon, 18 Nov 2019 17:14:06 GMT
< Server: Ruserv-1.0.0
< Connection: close
< Content-Language: en
< Last-Modified: Sat, 03 Nov 2018 14:10:11 GMT

--------------------------------------------------------------------------------
test_accept_header_text_ok: Test whether an Accept header with high qvalue returns plain text
* Connecting to the `cs531-dbittner: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 is empty
[PASSED]

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

< HTTP/1.1 200 Ok
< Date: Mon, 18 Nov 2019 17:14:06 GMT
< Content-Length: 193
< Content-Type: text/plain
< Last-Modified: Sat, 03 Nov 2018 14:10:11 GMT
< Connection: close
< Server: Ruserv-1.0.0
< Etag: "6b3ecc0295aadcca"
< Content-Language: en

--------------------------------------------------------------------------------
test_not_accptable_encoding: Test whether explicit zero qvalue for all supported encodings returns 406 Not Acceptable
* Connecting to the `cs531-dbittner: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-dbittner:80
> Accept-Encoding: compress; q=0.0, gzip; q=0.0, deflate; q=0.5
> Connection: close
> 

< HTTP/1.1 406 Not Acceptable
< Server: Ruserv-1.0.0
< Connection: close
< Content-Type: text/html
< Transfer-Encoding: chunked
< Date: Mon, 18 Nov 2019 17:14:06 GMT

--------------------------------------------------------------------------------
test_explicit_extention_ignore_content_negotiation: Test whether an explicit existing file extension ignores content negotiation
* Connecting to the `cs531-dbittner: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-dbittner:80
> Accept-Encoding: compress; q=0.0, gzip; q=0.5
> Connection: close
> 

< HTTP/1.1 200 Ok
< Content-Length: 42757
< Content-Type: text/html
< Content-Language: en
< Date: Mon, 18 Nov 2019 17:14:06 GMT
< Connection: close
< Last-Modified: Sat, 03 Nov 2018 14:22:55 GMT
< Content-Encoding: compress
< Server: Ruserv-1.0.0
< Etag: "16e98c39ea5db992"

--------------------------------------------------------------------------------
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-dbittner: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-dbittner:80
> Accept-Language: en; q=1.0, de; q=1.0, fr; q=1.0
> Connection: close
> 

< HTTP/1.1 300 Multiple Choice
< Alternates: {"index.html.en" 1 {type text/html} {language en}},{"index.html.de" 1 {type text/html} {language de}}
< Server: Ruserv-1.0.0
< Transfer-Encoding: chunked
< Date: Mon, 18 Nov 2019 17:14:06 GMT
< Connection: close
< Content-Type: text/html

--------------------------------------------------------------------------------
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-dbittner: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-dbittner: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, 18 Nov 2019 17:14:06 GMT
< Transfer-Encoding: chunked
< Connection: close
< Server: Ruserv-1.0.0
< Content-Type: text/html

--------------------------------------------------------------------------------
test_partial_content_range_text: Test whether a valid range request header returns partial content in plain text
* Connecting to the `cs531-dbittner: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-dbittner:80
> Range: bytes=10-20
> Connection: close
> 

< HTTP/1.1 206 Partial Content
< Content-Length: 11
< Date: Mon, 18 Nov 2019 17:14:06 GMT
< Server: Ruserv-1.0.0
< Content-Language: en
< Content-Type: text/plain
< Content-Range: bytes 10-20/193
< Connection: close
< 
* [Payload redacted (11 bytes)]

--------------------------------------------------------------------------------
test_etag_precondition_failure: Test whether a random If-Match ETag returns 412 Precondition Failed
* Connecting to the `cs531-dbittner: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-dbittner
> If-Match: "20933948kjaldsf000002"
> Connection: close
> 

< HTTP/1.1 412 Precondition Failed
< Transfer-Encoding: chunked
< Date: Mon, 18 Nov 2019 17:14:06 GMT
< Server: Ruserv-1.0.0
< Content-Type: text/html
< Connection: close
< 
* [Payload redacted (969 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-dbittner: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 `"2d6b2846e2785eef"`
* Payload size is `7277` bytes
[PASSED]

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

< HTTP/1.1 200 Ok
< Last-Modified: Sat, 03 Nov 2018 14:10:11 GMT
< Content-Length: 7277
< Connection: close
< Content-Type: text/html; charset=koi8-r
< Server: Ruserv-1.0.0
< Date: Mon, 18 Nov 2019 17:14:06 GMT
< Etag: "2d6b2846e2785eef"
< Content-Encoding: koi8-r
< Content-Language: ru
< 
* [Payload redacted (7277 bytes)]

--------------------------------------------------------------------------------
test_valid_etag_conditional_get: Test whether conditional GET with a valid ETag returns 200 OK
* Connecting to the `cs531-dbittner: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-dbittner
> If-Match: "2d6b2846e2785eef"
> Connection: close
> 

< HTTP/1.1 200 Ok
< Last-Modified: Sat, 03 Nov 2018 14:10:11 GMT
< Content-Language: ru
< Content-Encoding: koi8-r
< Server: Ruserv-1.0.0
< Content-Length: 7277
< Content-Type: text/html; charset=koi8-r
< Connection: close
< Etag: "2d6b2846e2785eef"
< Date: Mon, 18 Nov 2019 17:14:06 GMT
< 
* [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-dbittner: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-Range` header is present
* `Content-Length` header is present
* `Content-Length` header has value `100`
* Parsing second response
* 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`
* Parsing third response
* Response parsed
* Status is `200`
* `Content-Type` header is present
* `Content-Type` header has value `text/html; charset=iso-2022-jp`
* `Content-Language` header is present
* `Content-Language` header has value `ja`
* `Content-Length` header is present
* `Content-Length` header has value `7635`
* Payload is empty
* Socket connection is closed
[PASSED]

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

< HTTP/1.1 206 Partial Content
< Content-Length: 100
< Content-Language: en
< Date: Mon, 18 Nov 2019 17:14:06 GMT
< Connection: long-lived
< Content-Type: text/html
< Server: Ruserv-1.0.0
< Content-Range: bytes */7233
< 
< HTTP/1.1 300 Multiple Choice
< Server: Ruserv-1.0.0
< Transfer-Encoding: chunked
< Date: Mon, 18 Nov 2019 17:14:06 GMT
< Content-Type: text/html
< Connection: long-lived
< Alternates: {"index.html.de" 0 {type text/html} {language de}},{"index.html.en" 0 {type text/html} {language en}},{"index.html.es" 0 {type text/html} {language es}},{"index.html.ja.jis" 0 {type text/html} {language ja} {charset iso-2022-jp}},{"index.html.ko.euc-kr" 0 {type text/html} {language ko} {charset euc-kr}},{"index.html.ru.koi8-r" 0 {type text/html} {language ru} {charset koi8-r}}
< 
< HTTP/1.1 200 Ok
< Content-Type: text/html; charset=iso-2022-jp
< Etag: "689ebdd664a0a051"
< Content-Encoding: iso-2022-jp
< Date: Mon, 18 Nov 2019 17:14:06 GMT
< Last-Modified: Sat, 03 Nov 2018 14:10:11 GMT
< Content-Language: ja
< Connection: close
< Server: Ruserv-1.0.0
< Content-Length: 7635

=================================== SUMMARY ====================================
Server: cs531-dbittner:80
Test Case Results:
PASSED: test_useragent_get_text_ok
PASSED: test_partial_content_range_language
PASSED: test_chunked_404
PASSED: 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
PASSED: test_accept_header_png_ok
PASSED: 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
PASSED: test_pipeline_range_negotiate
--------------------------------------------------------------------------------
TOTAL: 18, PASSED: 18, FAILED: 0
===============================================================================

Destroying server: cs531-dbittner
Server `cs531-dbittner` destroyed successfully.
================================================================================
Assignment: cs531a4
Student: David Bittner <dbittner@cs.odu.edu>
Time: 20191118-172753 UTC
Repository: https://github.com/DavidBittner/http-webserver/tree/a4
Server: cs531-dbittner
================================================================================

Deploying server: cs531-dbittner

Cloning the `https://github.com/DavidBittner/http-webserver.git` repo and checking the `a4` branch/tag out
Released at: 2019-11-15T21:47:20Z
Step 1/24 : FROM rust:latest
 ---> e0566c997dc9
Step 2/24 : ENV listen_port 80
 ---> Using cache
 ---> 5e39bacdcd04
Step 3/24 : ENV server_home /home/http-server
 ---> Using cache
 ---> 3ccc8e33fae5
Step 4/24 : ENV test_url https://raw.githubusercontent.com/ibnesayeed/webserver-tester/master/sample/cs531-test-files.tar.gz
 ---> Using cache
 ---> b49b5284db15
Step 5/24 : ENV server_root /tmp
 ---> Using cache
 ---> 2a9627e17df0
Step 6/24 : RUN mkdir -p ${server_root}
 ---> Using cache
 ---> 10f3e97ed7df
Step 7/24 : ADD ${test_url} ${server_root}/test_files.tar.gz

 ---> Using cache
 ---> ab4756119791
Step 8/24 : RUN cd ${server_root} && tar -xf ${server_root}/test_files.tar.gz
 ---> Using cache
 ---> 8eab4aa558b7
Step 9/24 : RUN rm ${server_root}/test_files.tar.gz
 ---> Using cache
 ---> d6a76af05dfa
Step 10/24 : RUN apt -y update
 ---> Using cache
 ---> 1466fb2cde24
Step 11/24 : RUN apt -y install tree
 ---> Using cache
 ---> a95b6ac60f48
Step 12/24 : RUN tree ${server_root}
 ---> Using cache
 ---> f747aebf5dba
Step 13/24 : EXPOSE  ${listen_port}
 ---> Using cache
 ---> ab5697bfcca3
Step 14/24 : WORKDIR ${server_home}
 ---> Using cache
 ---> 1c3e63572815
Step 15/24 : RUN mkdir -p ${server_home}
 ---> Using cache
 ---> 8e14e771eec4
Step 16/24 : COPY src ${server_home}/src
 ---> Using cache
 ---> 8abb6a2af846
Step 17/24 : COPY templates ${server_home}/templates
 ---> Using cache
 ---> 21cb359f36ed
Step 18/24 : COPY Cargo.toml ${server_home}/
 ---> Using cache
 ---> b87c02fc0e71
Step 19/24 : COPY config.yml ${server_home}/
 ---> Using cache
 ---> 29c129aa7144
Step 20/24 : RUN cd ${server_home}
 ---> Using cache
 ---> dd210889c6cc
Step 21/24 : RUN cargo build --release
 ---> Using cache
 ---> 70681bf957dc
Step 22/24 : RUN echo "#!/bin/sh \n RUST_BACKTRACE=full SERV_LOG=trace SERV_ROOT="${server_root}" SERV_PORT="${listen_port}" ./target/release/http-webserver" > ${server_home}/start.sh
 ---> Using cache
 ---> 658081d38a5f
Step 23/24 : RUN chmod uo+x ${server_home}/start.sh
 ---> Using cache
 ---> c5e1b28a4e66
Step 24/24 : ENTRYPOINT ["/home/http-server/start.sh"]
 ---> Using cache
 ---> cf999fe7a9fe
Successfully built cf999fe7a9fe
Successfully tagged cs531/dbittner:a4

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

Testing server: cs531-dbittner against cs531a4 test suite

Testing cs531-dbittner:80
--------------------------------------------------------------------------------
test_basic_auth_realm: Test whether files are protected with HTTP Basic auth and return configured realm
* Connecting to the `cs531-dbittner: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-dbittner/a4-test/limited1/protected HTTP/1.1
> Host: cs531-dbittner:80
> User-Agent: CS531 Assignment 4 Tester/1574098082
> Connection: close
> 

< HTTP/1.1 401 Authorization Required
< Www-Authenticate: Basic realm="Fried Twice"
< Date: Mon, 18 Nov 2019 17:28:02 GMT
< Connection: close
< Server: Ruserv-1.0.0

--------------------------------------------------------------------------------
test_basic_wrong_auth_unauthorized: Test whether access is unauthorized with wrong Authorization header
* Connecting to the `cs531-dbittner: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-dbittner/a4-test/limited1/protected HTTP/1.1
> Host: cs531-dbittner:80
> User-Agent: CS531 Assignment 4 Tester/1574098082
> Authorization: Basic YmRhOm1sbg==
> Connection: close
> 

< HTTP/1.1 401 Authorization Required
< Www-Authenticate: Basic realm="Fried Twice"
< Date: Mon, 18 Nov 2019 17:28:02 GMT
< Server: Ruserv-1.0.0
< Connection: close

--------------------------------------------------------------------------------
test_nested_basic_auth: Test whether files in nested directories are protected with HTTP Basic auth
* Connecting to the `cs531-dbittner: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-dbittner/a4-test/limited1/1/protected2 HTTP/1.1
> Host: cs531-dbittner:80
> User-Agent: CS531 Assignment 4 Tester/1574098082
> Connection: close
> 

< HTTP/1.1 401 Authorization Required
< Date: Mon, 18 Nov 2019 17:28:02 GMT
< Server: Ruserv-1.0.0
< Www-Authenticate: Basic realm="Fried Twice"
< Connection: close

--------------------------------------------------------------------------------
test_basic_auth_ok: Test whether access is granted with valid Authorization header
* Connecting to the `cs531-dbittner: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-dbittner/a4-test/limited1/protected HTTP/1.1
> Host: cs531-dbittner:80
> User-Agent: CS531 Assignment 4 Tester/1574098082
> Referer: http://cs531-dbittner/a4-test/index.html
> Authorization: Basic bWxuOm1sbg==
> Connection: close
> 

< HTTP/1.1 200 Ok
< Date: Mon, 18 Nov 2019 17:28:02 GMT
< Content-Language: en
< Connection: close
< Content-Length: 24
< Etag: "240d2352a08f87cc"
< Server: Ruserv-1.0.0
< Content-Type: application/octet-stream
< Last-Modified: Tue, 10 Jan 2012 00:02:44 GMT
< 
* [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-dbittner: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-dbittner/a4-test/limited1/1/protected2 HTTP/1.1
> Host: cs531-dbittner:80
> User-Agent: CS531 Assignment 4 Tester/1574098082
> Authorization: Basic YmRhOmJkYQ==
> Connection: close
> 

< HTTP/1.1 200 Ok
< Etag: "360f6e7ee268b468"
< Content-Type: application/octet-stream
< Connection: close
< Content-Language: en
< Date: Mon, 18 Nov 2019 17:28:02 GMT
< Last-Modified: Tue, 10 Jan 2012 00:02:44 GMT
< Content-Length: 29
< Server: Ruserv-1.0.0
< 
* [Payload redacted (29 bytes)]

--------------------------------------------------------------------------------
test_double_auth_bad: Test whether two Authorization headers report a bad request
* Connecting to the `cs531-dbittner: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-dbittner/a4-test/limited1/protected HTTP/1.1
> Host: cs531-dbittner:80
> User-Agent: CS531 Assignment 4 Tester/1574098082
> Authorization: Basic YmRhOmJkYQ==
> Authorization: Basic ZZRhOmJkYQ==
> Connection: close
> 

< HTTP/1.1 400 Bad Request
< Content-Type: text/html
< Transfer-Encoding: chunked
< Server: Ruserv-1.0.0
< Date: Mon, 18 Nov 2019 17:28:02 GMT
< Connection: close
< 
* [Payload redacted (965 bytes)]

--------------------------------------------------------------------------------
test_nested_digest_auth: Test whether files in nested directories are protected with HTTP Digest auth
* Connecting to the `cs531-dbittner: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-dbittner/a4-test/limited2/foo/bar.txt HTTP/1.1
> Host: cs531-dbittner:80
> User-Agent: CS531 Assignment 4 Tester/1574098082
> Connection: close
> 

< HTTP/1.1 401 Authorization Required
< Www-Authenticate: Digest realm="Colonial Place", nonce="5bd8d98a77322fc00575f5cb1031d458", algorithm=md5, qop="auth"
< Date: Mon, 18 Nov 2019 17:28:03 GMT
< Server: Ruserv-1.0.0
< Connection: close

--------------------------------------------------------------------------------
test_head_nested_digest_auth: Test whether HEAD method in nested directories is protected with HTTP Digest auth
* Connecting to the `cs531-dbittner: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-dbittner/a4-test/limited2/foo/bar.txt HTTP/1.1
> Host: cs531-dbittner:80
> User-Agent: CS531 Assignment 4 Tester/1574098082
> Connection: close
> 

< HTTP/1.1 401 Authorization Required
< Server: Ruserv-1.0.0
< Connection: close
< Date: Mon, 18 Nov 2019 17:28:03 GMT
< Www-Authenticate: Digest realm="Colonial Place", nonce="26a892eb97ea34a6e3bae08e1eac75f6", algorithm=md5, qop="auth"

--------------------------------------------------------------------------------
test_options_nested_digest_auth: Test whether OPTIONS method in nested directories is protected with HTTP Digest auth
* Connecting to the `cs531-dbittner: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-dbittner/a4-test/limited2/foo/bar.txt HTTP/1.1
> Host: cs531-dbittner:80
> User-Agent: CS531 Assignment 4 Tester/1574098082
> Connection: close
> 

< HTTP/1.1 401 Authorization Required
< Www-Authenticate: Digest realm="Colonial Place", nonce="c388170ef6bb2e0886426d94eeb09a0e", algorithm=md5, qop="auth"
< Date: Mon, 18 Nov 2019 17:28:03 GMT
< Server: Ruserv-1.0.0
< Connection: close

--------------------------------------------------------------------------------
test_wrong_realm_unauthorized: Test whether an incorrect realm prevents authorization
* Connecting to the `cs531-dbittner: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-dbittner/a4-test/limited2/foo/bar.txt HTTP/1.1
> Host: cs531-dbittner:80
> Authorization: Digest username="mln", realm="ColonialPlace", uri="http://cs531-dbittner/a4-test/limited2/foo/bar.txt", qop=auth, nonce="35e90b68f73c31ab0f0eafa464a3c2e2", nc=00000001, cnonce="014a54548c61ba03827ef6a4dc2f7b4c", response="5ad4ddbaa02e7797bc4f883e36244dbf"
> Connection: close
> 

< HTTP/1.1 401 Authorization Required
< Connection: close
< Server: Ruserv-1.0.0
< Date: Mon, 18 Nov 2019 17:28:03 GMT
< Www-Authenticate: Digest realm="Colonial Place", nonce="a9523bd71df03e349f1690c804bef195", algorithm=md5, qop="auth"

--------------------------------------------------------------------------------
test_wrong_ncount_unauthorized: Test whether an incorrect nonce count prevents authorization
* Connecting to the `cs531-dbittner: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-dbittner/a4-test/limited2/foo/bar.txt HTTP/1.1
> Host: cs531-dbittner:80
> Authorization: Digest username="mln", realm="Colonial Place", uri="http://cs531-dbittner/a4-test/limited2/foo/bar.txt", qop=auth, nonce="d9da2424f9beaa8904f6e69d5912eb63", nc=00000002, cnonce="014a54548c61ba03827ef6a4dc2f7b4c", response="52e8adde2fdc5a81aa3dd42f6dc45176"
> Connection: close
> 

< HTTP/1.1 401 Authorization Required
< Server: Ruserv-1.0.0
< Www-Authenticate: Digest realm="Colonial Place", nonce="f448462810576802a8a73f69735bc9c5", algorithm=md5, qop="auth"
< Date: Mon, 18 Nov 2019 17:28:03 GMT
< Connection: close

--------------------------------------------------------------------------------
test_wrong_digest_response_unauthorized: Test whether an incorrect digest response prevents authorization
* Connecting to the `cs531-dbittner: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-dbittner/a4-test/limited2/foo/bar.txt HTTP/1.1
> Host: cs531-dbittner:80
> Authorization: Digest username="mln", realm="Colonial Place", uri="http://cs531-dbittner/a4-test/limited2/foo/bar.txt", qop=auth, nonce="ca1d848ed5c9e7bcd5a57934dca433be", nc=00000001, cnonce="014a54548c61ba03827ef6a4dc2f7b4c", response="1860164ee74faed98e35218e35a8f807"
> Connection: close
> 

< HTTP/1.1 401 Authorization Required
< Date: Mon, 18 Nov 2019 17:28:03 GMT
< Www-Authenticate: Digest realm="Colonial Place", nonce="1af16f48329d8ae912ae7715695ce599", algorithm=md5, qop="auth"
< Server: Ruserv-1.0.0
< Connection: close

--------------------------------------------------------------------------------
test_wrong_digest_user_unauthorized: Test whether an incorrect digest user prevents authorization
* Connecting to the `cs531-dbittner: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-dbittner/a4-test/limited2/foo/bar.txt HTTP/1.1
> Host: cs531-dbittner:80
> Authorization: Digest username="bda", realm="Colonial Place", uri="http://cs531-dbittner/a4-test/limited2/foo/bar.txt", qop=auth, nonce="434de97d6fcdabd698da1d1dd3aacf5e", nc=00000002, cnonce="014a54548c61ba03827ef6a4dc2f7b4c", response="793103bde6baa9f4330acc4a7fe2bab7"
> Connection: close
> 

< HTTP/1.1 401 Authorization Required
< Server: Ruserv-1.0.0
< Date: Mon, 18 Nov 2019 17:28:03 GMT
< Www-Authenticate: Digest realm="Colonial Place", nonce="7f0efb9d5df5347fcc55bd41537d7c32", algorithm=md5, qop="auth"
< Connection: close

--------------------------------------------------------------------------------
test_correct_realm_authorized: Test whether a correct realm with other values grants authorization
* Connecting to the `cs531-dbittner:80` server
* Request data sent
* Response data read
* Response parsed
* Status is `200`
* `Authentication-Info` header is present
* `Authentication-Info` header contains `fae0122ee9c41f0c653740ba9d841496`
[PASSED]

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

< HTTP/1.1 200 Ok
< Connection: close
< Content-Length: 18
< Content-Language: en
< Server: Ruserv-1.0.0
< Last-Modified: Tue, 10 Jan 2012 00:02:44 GMT
< Date: Mon, 18 Nov 2019 17:28:03 GMT
< Content-Type: text/plain
< Etag: "59df54253b2c6ee9"
< Authentication-Info: fae0122ee9c41f0c653740ba9d841496
< 
* [Payload redacted (18 bytes)]

--------------------------------------------------------------------------------
test_auth_over_conditional_get: Test whether authorization is ensured before conditional GET precondition check
* Connecting to the `cs531-dbittner: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-dbittner
> If-Match: "x248kjaldsf00000000002"
> Connection: close
> 

< HTTP/1.1 401 Authorization Required
< Date: Mon, 18 Nov 2019 17:28:03 GMT
< Server: Ruserv-1.0.0
< Connection: close
< Www-Authenticate: Digest realm="Colonial Place", nonce="7eedb07eba782d16c165c5c86bec1ba0", algorithm=md5, qop="auth"

--------------------------------------------------------------------------------
test_large_range_not_satisfiable: Test whether a Range larger than the file returns 416 Range Not Satisfiable
* Connecting to the `cs531-dbittner:80` server
* Request data sent
* Response data read
* Response parsed
* Status is `416`
* Payload is empty
[PASSED]

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

< HTTP/1.1 416 Range Not Satisfiable
< Date: Mon, 18 Nov 2019 17:28:03 GMT
< Server: Ruserv-1.0.0
< Connection: close
< Content-Type: text/html
< Transfer-Encoding: chunked

--------------------------------------------------------------------------------
test_pipeline_auth: Test whether authorization is respected in pipeline requests
* Connecting to the `cs531-dbittner:80` server
* Request data sent
* Response data read
* Response parsed
* Status is `416`
* Parsing second response
* Response parsed
* Status is `200`
* `Content-Type` header is present
* `Content-Type` header begins with `text/html`
* `Content-Language` header is present
* `Content-Language` header has value `de`
* Parsing third response
* Response parsed
* Status is `401`
* `WWW-Authenticate` header is present
* `WWW-Authenticate` header has value `Basic realm="Fried Twice"`
* Parsing fourth response
* Response parsed
* Status is `200`
* `Content-Type` header is present
* `Content-Type` header begins with `text/html`
* `Content-Language` header is present
* `Content-Language` header has value `en`
* Parsing fifth response
* Response parsed
* Status is `200`
* `Content-Type` header is present
* `Content-Type` header has value `text/html; charset=iso-2022-jp`
* `Content-Language` header is present
* `Content-Language` header has value `ja`
* `Content-Length` header is present
* `Content-Length` header has value `7635`
* Payload is empty
* Socket connection is closed
[PASSED]

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

< HTTP/1.1 416 Range Not Satisfiable
< Connection: long-lived
< Date: Mon, 18 Nov 2019 17:28:03 GMT
< Server: Ruserv-1.0.0
< Transfer-Encoding: chunked
< Content-Type: text/html
< 
< HTTP/1.1 200 Ok
< Last-Modified: Tue, 10 Jan 2012 00:02:44 GMT
< Content-Length: 7316
< Etag: "1c43960cdc54a27f"
< Connection: long-lived
< Date: Mon, 18 Nov 2019 17:28:03 GMT
< Server: Ruserv-1.0.0
< Content-Type: text/html
< Content-Language: de
< 
< HTTP/1.1 401 Authorization Required
< Date: Mon, 18 Nov 2019 17:28:03 GMT
< Server: Ruserv-1.0.0
< Www-Authenticate: Basic realm="Fried Twice"
< Connection: long-lived
< 
< HTTP/1.1 200 Ok
< Connection: long-lived
< Content-Length: 7233
< Date: Mon, 18 Nov 2019 17:28:03 GMT
< Etag: "d3d4c083d9e543ca"
< Server: Ruserv-1.0.0
< Last-Modified: Tue, 10 Jan 2012 00:02:44 GMT
< Content-Language: en
< Content-Type: text/html
< 
< HTTP/1.1 200 Ok
< Content-Encoding: iso-2022-jp
< Content-Length: 7635
< Content-Type: text/html; charset=iso-2022-jp
< Content-Language: ja
< Connection: close
< Date: Mon, 18 Nov 2019 17:28:03 GMT
< Server: Ruserv-1.0.0
< Etag: "a535fa686d1b3f12"
< Last-Modified: Tue, 10 Jan 2012 00:02:44 GMT

=================================== SUMMARY ====================================
Server: cs531-dbittner: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
PASSED: test_correct_realm_authorized
PASSED: test_auth_over_conditional_get
PASSED: test_large_range_not_satisfiable
PASSED: test_pipeline_auth
--------------------------------------------------------------------------------
TOTAL: 17, PASSED: 17, FAILED: 0
===============================================================================

Destroying server: cs531-dbittner
Server `cs531-dbittner` destroyed successfully.
ibnesayeed commented 4 years ago