diff options
author | Lars Wirzenius <liw@liw.fi> | 2020-07-19 10:32:08 +0000 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2020-07-19 10:32:08 +0000 |
commit | f06b0bccfdb7459be0947a6fd6f726eba4bcf92d (patch) | |
tree | 7fafc5f2d22eaf68c9dcfea5a74fe03d6b0676c8 /ewww.md | |
parent | f1590591451f135ca903e20f24ca5a9d0e7fba14 (diff) | |
parent | b130e74f187b2ba22db6654508a6e7e4c721a16e (diff) | |
download | ewww-f06b0bccfdb7459be0947a6fd6f726eba4bcf92d.tar.gz |
Merge branch 'serve-files' into 'master'
Serve files
See merge request larswirzenius/ewww!7
Diffstat (limited to 'ewww.md')
-rw-r--r-- | ewww.md | 54 |
1 files changed, 6 insertions, 48 deletions
@@ -85,59 +85,16 @@ for static content only. Every other method returns an error. # Acceptance criteria -## Minimal smoke test - -~~~scenario -given a self-signed certificate as snakeoil.pem, using key snakeoil.key -and a running server using config file minimal.yaml -when I request GET https://example.com/ -then I get status code 200 -~~~ - -~~~{#minimal.yaml .file .yaml} -tls_key: snakeoil.key -tls_cert: snakeoil.pem -~~~ - - ## Smoke test ~~~scenario given a self-signed certificate as snakeoil.pem, using key snakeoil.key -and a running server using config file smoke.yaml -when I create webroot/foo with "hello, world" -and I request GET https://example.com/foo -then I get status code 200 -and header content-type is "text/plain" -and body is "hello, world\n" -~~~ - -~~~scenario-disabled -given a self-signed certificate as snakeoil.pem, using key snakeoil.key -and a running server using config file smoke.yaml - -when I request GET http://example.com/ -then I am redirected to https://example.com/ - -when I request GET http://example.com/.well-known/foo -then I get status code 404 - -when I create webroot/foo -and I request GET http://example.com/.well-known/foo +when I create webroot/foo.html with "this is your web page" +given a running server using config file smoke.yaml +when I request GET https://example.com/foo.html then I get status code 200 -and content-type is "application/octet-stream" - -when I request HEAD http://example.com/.well-known/foo -then I get status code 200 - -when I request GET https://example.com/ -then I get status code 200 - -when I request HEAD https://example.com/ -then I get status code 200 - -when I request GET https://www.example.com/ -then I am redirected to https://example.com/ +and header content-type is "text/html" +and body is "this is your web page" ~~~ The following config file does not specify port numbers. The test @@ -145,6 +102,7 @@ scaffolding adds randomly chosen port numbers so that the test can run without being root. ~~~{#smoke.yaml .file .yaml .numberLines} +webroot: webroot tls_cert: snakeoil.pem tls_key: snakeoil.key ~~~ |