Include what should be working as a render display time. CSS currently does not propogate every single run
This commit is contained in:
parent
6cd3a226a9
commit
e81f29b793
@ -0,0 +1,4 @@
|
||||
.generateTime{
|
||||
font-size:10px;
|
||||
color:blue;
|
||||
}
|
@ -1,7 +1,7 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<link rel=\"stylesheet\" href=\"sig.css\">
|
||||
<link rel="stylesheet" type="text/css" href="/sig.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<link rel=\"stylesheet\" href=\"sig.css\">
|
||||
<link rel="stylesheet" type="text/css" href="/sig.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
@ -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(("<div class=\"generateTime\">Webpage generated in "+(System.currentTimeMillis()-startTime)+"ms</div>\r\n").getBytes());
|
||||
}
|
||||
} else {
|
||||
CreateRawRequest(clientOutput,statusCode,statusMsg,"text/html","We're sorry, your webpage is in another castle!".getBytes());
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user