Add test website cases for double slash

This commit is contained in:
benoit74 2024-11-26 14:01:39 +00:00
parent 8fb6478744
commit 1e6367c712
No known key found for this signature in database
GPG key ID: B89606434FC7B530
4 changed files with 36 additions and 1 deletions

View file

@ -73,6 +73,14 @@
respond /502-response 502 respond /502-response 502
respond // "Hello you" 400
respond /double-slash/test1 "Hello you" 200
respond /double-slash//test1 400
respond /double-slash/test2 "Hello you v1" 200
respond /double-slash//test2 "Hello you v2" 200
redir /301-internal-redirect-ok /internal_redirect_target.html 301 redir /301-internal-redirect-ok /internal_redirect_target.html 301
redir /301-external-redirect-ok https://www.example.com 301 redir /301-external-redirect-ok https://www.example.com 301
redir /302-internal-redirect-ok /internal_redirect_target.html 302 redir /302-internal-redirect-ok /internal_redirect_target.html 302

View file

@ -1,5 +1,5 @@
FROM caddy:2.6.1-alpine FROM caddy:2.6.1-alpine
LABEL org.opencontainers.image.source https://github.com/openzim/warc2zim LABEL org.opencontainers.image.source=https://github.com/openzim/warc2zim
COPY Caddyfile /etc/caddy/Caddyfile COPY Caddyfile /etc/caddy/Caddyfile

View file

@ -0,0 +1,26 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Test website</title>
<link rel="apple-touch-icon" sizes="180x180" href="./icons/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="./icons/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="./icons/favicon-16x16.png">
<link rel="manifest" href="./icons/site.webmanifest">
<link rel="shortcut icon" href="./icons/favicon.ico">
</head>
<body>
<h2>Double slash in URLs</h2>
<a href=".//">.//</a>
<a href="./double-slash//test1">./double-slash//test1</a>
<a href="./double-slash/test1">./double-slash/test1</a>
<a href="./double-slash/test2">./double-slash/test2</a>
<a href="./double-slash//test2">./double-slash//test2</a>
</body>
</html>

View file

@ -52,6 +52,7 @@
<li><a href="./http-equiv-redirect.html">Redirect with http-equiv meta directive</a></li> <li><a href="./http-equiv-redirect.html">Redirect with http-equiv meta directive</a></li>
<li><a href="./image-srcset.html">Image with srcset</a></li> <li><a href="./image-srcset.html">Image with srcset</a></li>
<li><a href="./form-get.html">Form GET</a></li> <li><a href="./form-get.html">Form GET</a></li>
<li><a href="./double-slash.html">Double Slash</a></li>
</ul> </ul>
</body> </body>