Add testfiles to serve
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,5 +1,4 @@
|
||||
.vscode
|
||||
bin/www/
|
||||
build/
|
||||
|
||||
bin/*.out
|
||||
|
||||
BIN
bin/www/file_example_MP4_480_1_5MG.mp4
Normal file
BIN
bin/www/file_example_MP4_480_1_5MG.mp4
Normal file
Binary file not shown.
BIN
bin/www/hope.jpg
Executable file
BIN
bin/www/hope.jpg
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 331 KiB |
15
bin/www/index.css
Executable file
15
bin/www/index.css
Executable file
@@ -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");
|
||||
}
|
||||
14
bin/www/index.html
Executable file
14
bin/www/index.html
Executable file
@@ -0,0 +1,14 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Testing Grounds</title>
|
||||
<link rel="stylesheet" type="text/css" href="index.css">
|
||||
</head>
|
||||
<body>
|
||||
<h1>Beware...</h1>
|
||||
<p>Testing environment</p>
|
||||
<a href="multimedia.html">Goto multimedia.html</a>
|
||||
<br>
|
||||
<a href="subdir/index.html">Goto subdir/index.html</a>
|
||||
</body>
|
||||
</html>
|
||||
31
bin/www/multimedia.html
Executable file
31
bin/www/multimedia.html
Executable file
@@ -0,0 +1,31 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Testing Grounds</title>
|
||||
<script src="test.js" defer></script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>This is testfile2.html</h1>
|
||||
<p>Lorum Ipsum</p>
|
||||
<a href="index.html">Back to index.html</a>
|
||||
<br>
|
||||
<p>Now supporting multimedia</p>
|
||||
<br>
|
||||
<img src="robedude.png" alt="Robe dude">
|
||||
<br>
|
||||
<video width="320" height="240" controls>
|
||||
<source src="file_example_MP4_480_1_5MG.mp4" type="video/mp4">
|
||||
Video tag not supported by your browser
|
||||
</video>
|
||||
<br>
|
||||
<p>
|
||||
Music from https://filmmusic.io:
|
||||
"Ouroboros" by Kevin MacLeod (https://incompetech.com)
|
||||
Licence: CC BY (http://creativecommons.org/licenses/by/4.0/)
|
||||
</p>
|
||||
<audio controls>
|
||||
<source src="ouroboros-by-kevin-macleod.mp3" type="audio/mp3">
|
||||
Audio tag not supported by your browser
|
||||
</audio>
|
||||
</body>
|
||||
</html>
|
||||
BIN
bin/www/ouroboros-by-kevin-macleod.mp3
Normal file
BIN
bin/www/ouroboros-by-kevin-macleod.mp3
Normal file
Binary file not shown.
BIN
bin/www/robedude.png
Executable file
BIN
bin/www/robedude.png
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 628 B |
61
bin/www/statuscodes.txt
Executable file
61
bin/www/statuscodes.txt
Executable file
@@ -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
|
||||
16
bin/www/subdir/index.html
Normal file
16
bin/www/subdir/index.html
Normal file
@@ -0,0 +1,16 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h1>subdir</h1>
|
||||
<img src="/robedude.png">
|
||||
<img src="../robedude.png">
|
||||
</body>
|
||||
<h2>Form</h2>
|
||||
<form method="POST">
|
||||
<input type="text" placeholder="placeholder">
|
||||
<button type="submit">Submit</button>
|
||||
</form>
|
||||
</html>
|
||||
1
bin/www/test.js
Normal file
1
bin/www/test.js
Normal file
@@ -0,0 +1 @@
|
||||
console.log("Hello world");
|
||||
@@ -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"
|
||||
@@ -9,7 +9,7 @@ function TestGetHeader()
|
||||
if [ -n "$headerContentType" ]; then
|
||||
echo "SUCCESS HEAD $1"
|
||||
else
|
||||
echo "FAILURE HEAD $1 contains bad MIME type (expected <Content-Type: $2> but got <$headerContentType>)"
|
||||
echo "FAILURE HEAD $1 contains bad MIME type (expected <Content-Type: $2>"
|
||||
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'
|
||||
Reference in New Issue
Block a user