diff --git a/.gitignore b/.gitignore index 521d914..ed23b3f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,4 @@ .vscode -bin/www/ build/ bin/*.out diff --git a/bin/www/file_example_MP4_480_1_5MG.mp4 b/bin/www/file_example_MP4_480_1_5MG.mp4 new file mode 100644 index 0000000..b11552f Binary files /dev/null and b/bin/www/file_example_MP4_480_1_5MG.mp4 differ diff --git a/bin/www/hope.jpg b/bin/www/hope.jpg new file mode 100755 index 0000000..0d3ff5b Binary files /dev/null and b/bin/www/hope.jpg differ diff --git a/bin/www/index.css b/bin/www/index.css new file mode 100755 index 0000000..c7883f0 --- /dev/null +++ b/bin/www/index.css @@ -0,0 +1,15 @@ +h1 { + text-align: center; + color: #FFFFFF; + text-shadow: 1px; +} + +a { + text-align: left; + font-size: 72px; + color: blue; +} + +body { + background-image: url("hope.jpg"); +} diff --git a/bin/www/index.html b/bin/www/index.html new file mode 100755 index 0000000..e05fdc8 --- /dev/null +++ b/bin/www/index.html @@ -0,0 +1,14 @@ + + + + Testing Grounds + + + +

Beware...

+

Testing environment

+ Goto multimedia.html +
+ Goto subdir/index.html + + diff --git a/bin/www/multimedia.html b/bin/www/multimedia.html new file mode 100755 index 0000000..eeeeda6 --- /dev/null +++ b/bin/www/multimedia.html @@ -0,0 +1,31 @@ + + + + Testing Grounds + + + +

This is testfile2.html

+

Lorum Ipsum

+ Back to index.html +
+

Now supporting multimedia

+
+ Robe dude +
+ +
+

+ Music from https://filmmusic.io: + "Ouroboros" by Kevin MacLeod (https://incompetech.com) + Licence: CC BY (http://creativecommons.org/licenses/by/4.0/) +

+ + + diff --git a/bin/www/ouroboros-by-kevin-macleod.mp3 b/bin/www/ouroboros-by-kevin-macleod.mp3 new file mode 100644 index 0000000..05a5955 Binary files /dev/null and b/bin/www/ouroboros-by-kevin-macleod.mp3 differ diff --git a/bin/www/robedude.png b/bin/www/robedude.png new file mode 100755 index 0000000..1426f59 Binary files /dev/null and b/bin/www/robedude.png differ diff --git a/bin/www/statuscodes.txt b/bin/www/statuscodes.txt new file mode 100755 index 0000000..43cb35d --- /dev/null +++ b/bin/www/statuscodes.txt @@ -0,0 +1,61 @@ +CONTINUE=100, +SWITCHING_PROTOCOLS=101, +PROCESSING=102, +OK=200, +CREATED=201, +ACCEPTED=202, +NON_AUTHORITATIVE_INFORMATION=203, +NO_CONTENT=204, +RESET_CONTENT=205, +PARTIAL_CONTENT=206, +MULTI_STATUS=207, +ALREADY_REPORTED=208, +IM_USED=226, +MULTIPLE_CHOICES=300, +MOVED_PERMANENTLY=301, +FOUND=302, +SEE_OTHER=303, +NOT_MODIFIED=304, +USE_PROXY=305, +(UNUSED)=306, +TEMPORARY_REDIRECT=307, +PERMANENT_REDIRECT=308, +BAD_REQUEST=400, +UNAUTHORIZED=401, +PAYMENT_REQUIRED=402, +FORBIDDEN=403, +NOT_FOUND=404, +METHOD_NOT_ALLOWED=405, +NOT_ACCEPTABLE=406, +PROXY_AUTHENTICATION_REQUIRED=407, +REQUEST_TIMEOUT=408, +CONFLICT=409, +GONE=410, +LENGTH_REQUIRED=411, +PRECONDITION_FAILED=412, +PAYLOAD_TOO_LARGE=413, +URI_TOO_LONG=414, +UNSUPPORTED_MEDIA_TYPE=415, +RANGE_NOT_SATISFIABLE=416, +EXPECTATION_FAILED=417, +I_AM_A_TEAPOT=418, +MISDIRECTED_REQUEST=421, +UNPROCESSABLE_ENTITY=422, +LOCKED=423, +FAILED_DEPENDENCY=424, +UPGRADE_REQUIRED=426, +PRECONDITION_REQUIRED=428, +TOO_MANY_REQUESTS=429, +REQUEST_HEADER_FIELDS_TOO_LARGE=431, +UNAVAILABLE_FOR_LEGAL_REASONS=451, +INTERNAL_SERVER_ERROR=500, +NOT_IMPLEMENTED=501, +BAD_GATEWAY=502, +SERVICE_UNAVAILABLE=503, +GATEWAY_TIMEOUT=504, +HTTP_VERSION_NOT_SUPPORTED=505, +VARIANT_ALSO_NEGOTIATES=506, +INSUFFICIENT_STORAGE=507, +LOOP_DETECTED=508, +NOT_EXTENDED=510, +NETWORK_AUTHENTICATION_REQUIRED=511 diff --git a/bin/www/subdir/index.html b/bin/www/subdir/index.html new file mode 100644 index 0000000..49136ab --- /dev/null +++ b/bin/www/subdir/index.html @@ -0,0 +1,16 @@ + + + + + + +

subdir

+ + + +

Form

+
+ + +
+ \ No newline at end of file diff --git a/bin/www/test.js b/bin/www/test.js new file mode 100644 index 0000000..592f786 --- /dev/null +++ b/bin/www/test.js @@ -0,0 +1 @@ +console.log("Hello world"); \ No newline at end of file diff --git a/test/test_get.sh b/test/test_get.sh index 742eecc..0ec7d14 100755 --- a/test/test_get.sh +++ b/test/test_get.sh @@ -34,7 +34,8 @@ echo "********" TestGET "index.html" TestGET "robedude.png" TestGET "hope.jpg" -TestGET "nevada.mp3" +TestGET "ouroboros-by-kevin-macleod.mp3" +TestGET "file_example_MP4_480_1_5MG.mp4" TestGET "index.css" TestGET "test.js" TestGET "subdir/index.html" \ No newline at end of file diff --git a/test/test_head.sh b/test/test_head.sh index ab2f55c..64c2f1f 100755 --- a/test/test_head.sh +++ b/test/test_head.sh @@ -9,7 +9,7 @@ function TestGetHeader() if [ -n "$headerContentType" ]; then echo "SUCCESS HEAD $1" else - echo "FAILURE HEAD $1 contains bad MIME type (expected but got <$headerContentType>)" + echo "FAILURE HEAD $1 contains bad MIME type (expected " fi rm $curlHeaderOutputFile @@ -32,7 +32,8 @@ echo "*********" TestHEAD "index.html" 'text/html' TestHEAD "robedude.png" 'image/png' TestHEAD "hope.jpg" 'image/jpeg' -TestHEAD "nevada.mp3" 'audio/mpeg3' +TestHEAD "ouroboros-by-kevin-macleod.mp3" 'audio/mpeg3' +TestHEAD "file_example_MP4_480_1_5MG.mp4" 'video/mp4' TestHEAD "index.css" 'text/css' TestHEAD "test.js" 'application/javascript' TestHEAD "subdir/index.html" 'text/html' \ No newline at end of file