From e81f29b7934287c9ccb029c87ea3752a09bbef46 Mon Sep 17 00:00:00 2001 From: "sigonasr2, Sig, Sigo" Date: Mon, 2 May 2022 20:23:50 +0000 Subject: [PATCH] Include what should be working as a render display time. CSS currently does not propogate every single run --- out/sig.css | 4 ++++ out/testfile.html | 2 +- ref/DEFAULT.html | 2 +- sigServer.java | 4 ++++ 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/out/sig.css b/out/sig.css index e69de29..f3e591d 100644 --- a/out/sig.css +++ b/out/sig.css @@ -0,0 +1,4 @@ +.generateTime{ + font-size:10px; + color:blue; +} \ No newline at end of file diff --git a/out/testfile.html b/out/testfile.html index ddb8d10..c684ebb 100644 --- a/out/testfile.html +++ b/out/testfile.html @@ -1,7 +1,7 @@ - + diff --git a/ref/DEFAULT.html b/ref/DEFAULT.html index 6155e56..c96489d 100644 --- a/ref/DEFAULT.html +++ b/ref/DEFAULT.html @@ -1,7 +1,7 @@ - + diff --git a/sigServer.java b/sigServer.java index 813c0db..8f3684c 100644 --- a/sigServer.java +++ b/sigServer.java @@ -60,12 +60,16 @@ public class sigServer { } private void CreateRequest(Socket client, String statusCode, String statusMsg, String string) { + long startTime = System.currentTimeMillis(); Path file = Paths.get(sigPlace.OUTDIR,string); try { OutputStream clientOutput = client.getOutputStream(); if (statusCode.equals("200")) { if (Files.exists(file)) { CreateRawRequest(clientOutput,statusCode,statusMsg,Files.probeContentType(file),Files.readAllBytes(file)); + if (Files.probeContentType(file).equals("text/html")) { + clientOutput.write(("
Webpage generated in "+(System.currentTimeMillis()-startTime)+"ms
\r\n").getBytes()); + } } else { CreateRawRequest(clientOutput,statusCode,statusMsg,"text/html","We're sorry, your webpage is in another castle!".getBytes()); }