Skip to content

Commit

Permalink
Merge branch 'master' of github.com:DannyArends/DaNode
Browse files Browse the repository at this point in the history
  • Loading branch information
DannyArends committed Dec 14, 2024
2 parents ddb3cc8 + e4cc883 commit 79ffbd5
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
7 changes: 6 additions & 1 deletion danode/post.d
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,12 @@ final void serverAPI(in FileSystem filesystem, in WebConfig config, in Request r
// TODO: Add content.put(format("S=PATH=%s\n", CGI import path ));
// TODO: Add content.put(format("S=SERVER_SIGNATURE=<address>%s</address>\n", Server Signature ));
content.put(format("S=SERVER_SOFTWARE=%s\n", SERVERINFO));
content.put(format("S=SERVER_NAME=%s\n", (response.address)? response.address.toHostNameString() : "localhost"));
try{
content.put(format("S=SERVER_NAME=%s\n", (response.address)? response.address.toHostNameString() : "localhost"));
}catch(Exception e){
warning("Exception while trying to call: toHostNameString()");
content.put("S=SERVER_NAME=localhost\n");
}
content.put(format("S=SERVER_ADDR=%s\n", (response.address)? response.address.toAddrString() : "127.0.0.1"));
content.put(format("S=SERVER_PORT=%s\n", (response.address)? response.address.toPortString() : "80"));
content.put(format("S=REMOTE_ADDR=%s\n", request.ip));
Expand Down
7 changes: 7 additions & 0 deletions www/localhost/etc/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
body{
font-family: Georgia, Times, serif;
}

h1, h2, h3, h4, h5, h6 {
text-shadow: 1px 1px 1px #ccc;
}
1 change: 1 addition & 0 deletions www/localhost/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<head>
<title>DaNode 'user defined' test page</title>
<meta name='author' content='Danny Arends'>
<link rel="stylesheet" href="/etc/style.css">
</head>
<body>
<h4>DaNode 'user defined' test page</h4>
Expand Down

0 comments on commit 79ffbd5

Please sign in to comment.