From b48b682da76869ac35cdb842d6bf693709a06cd7 Mon Sep 17 00:00:00 2001 From: Nova Date: Tue, 24 Mar 2026 22:50:26 +0100 Subject: [PATCH] html, branding change and getting ready for pre-rel --- html/index.html | 6 +++--- pywebsrv.py | 22 +++++++++++----------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/html/index.html b/html/index.html index 641a1db..a4a2833 100644 --- a/html/index.html +++ b/html/index.html @@ -6,9 +6,9 @@

Hello from Amethyst!

-

This page confirms Amethyst can read files from your PC and serve them to your browser!

-

If you see this page and you're not the server owner, tell them they misconfigured something!

-

This server runs Amethyst Alpha Build 0048

+

This page confirms Amethyst can read files from your PC or server and serve them to your browser!

+

This is a test page, if you aren't the server owner, they might not have finished setting up their site, be patient. If this doesn't go away after a while, tell them they've made an oopsie

+

This server runs Amethyst Pre-Rel Build 0053

diff --git a/pywebsrv.py b/pywebsrv.py index 56c0dca..e9f9669 100644 --- a/pywebsrv.py +++ b/pywebsrv.py @@ -61,7 +61,7 @@ except ImportError: ) # pass -AMETHYST_BUILD_NUMBER = "0052" +AMETHYST_BUILD_NUMBER = "0053" AMETHYST_REPO = "https://git.novacow.ch/Nova/PyWebServer/" @@ -373,18 +373,18 @@ class WebServer: ) self.http_404_html = ( - "HTTP 404 - PyWebServer" - f"

HTTP 404 - Not Found!

Running PyWebServer/amethyst-build-{AMETHYST_BUILD_NUMBER}

" + "HTTP 404 - Amethyst" + f"

HTTP 404 - Not Found!

Running Amethyst/build-{AMETHYST_BUILD_NUMBER}

" "
" ) self.http_403_html = ( - "HTTP 403 - PyWebServer" - f"

HTTP 403 - Forbidden

Running PyWebServer/amethyst-build-{AMETHYST_BUILD_NUMBER}

" + "HTTP 403 - Amethyst" + f"

HTTP 403 - Forbidden

Running Amethyst/build-{AMETHYST_BUILD_NUMBER}

" "
" ) self.http_405_html = ( - "HTTP 405 - PyWebServer" - f"

HTTP 405 - Method not allowed

Running PyWebServer/amethyst-build-{AMETHYST_BUILD_NUMBER}

" + "HTTP 405 - Amethyst" + f"

HTTP 405 - Method not allowed

Running Amethyst/build-{AMETHYST_BUILD_NUMBER}

" "
" ) @@ -565,7 +565,7 @@ class WebServer: status_message = messages.get(status_code) headers = ( f"HTTP/1.1 {status_code} {status_message}\r\n" - f"Server: PyWebServer/amethyst-build-{AMETHYST_BUILD_NUMBER}\r\n" + f"Server: Amethyst/amethyst-build-{AMETHYST_BUILD_NUMBER}\r\n" f"Content-Type: {content_type}\r\n" f"Content-Length: {len(binary_data)}\r\n" f"Connection: close\r\n\r\n" @@ -602,7 +602,7 @@ class WebServer: # Don't encode yet, if 302 status code we have to include location. headers = ( f"HTTP/1.1 {status_code} {status_message}\r\n" - f"Server: PyWebServer/amethyst-build-{AMETHYST_BUILD_NUMBER}\r\n" + f"Server: Amethyst/build-{AMETHYST_BUILD_NUMBER}\r\n" f"Content-Length: {len(body)}\r\n" f"Connection: close\r\n\r\n" ).encode() @@ -618,7 +618,7 @@ class WebServer: headers = ( f"HTTP/1.1 {status_code} {status_message}\r\n" f"Location: {host}\r\n" - f"Server: PyWebServer/amethyst-build-{AMETHYST_BUILD_NUMBER}\r\n" + f"Server: Amethyst/build-{AMETHYST_BUILD_NUMBER}\r\n" f"Content-Length: {len(body)}\r\n" f"Connection: close\r\n\r\n" ).encode() @@ -626,7 +626,7 @@ class WebServer: if status_code == 621: headers = ( f"HTTP/1.1 {status_code} {status_message}\r\n" - "Server: PyWebServer/amethyst-build-0621\r\n" + "Server: Amethyst/build-0621\r\n" "Content-Length: 30\r\n" f"Connection: close\r\n\r\n" )