dannyarends / danode Goto Github PK
View Code? Open in Web Editor NEWSmall and flexible web server written using the D 2.0 language
Home Page: https://www.dannyarends.nl
License: GNU General Public License v3.0
Small and flexible web server written using the D 2.0 language
Home Page: https://www.dannyarends.nl
License: GNU General Public License v3.0
Static files do not get re-buffered and compressed correctly on save.
λ cd .\Temp\Git
C:\Temp\Git
λ git clone https://github.com/DannyArends/DaNode.git
Cloning into 'DaNode'...
remote: Enumerating objects: 35, done.
remote: Counting objects: 100% (35/35), done.
remote: Compressing objects: 100% (24/24), done.
Rremote: Total 2006 (delta 17), reused 24 (delta 11), pack-reused 1971eceiving objects: 99% (1986/2006)
Receiving objects: 100% (2006/2006), 419.11 KiB | 1.15 MiB/s, done.
Resolving deltas: 100% (1356/1356), done.
λ cd DaNode
C:\Temp\Git\DaNode [master ≡]
λ dub build
Performing "debug" build using dmd for x86_64.
danode ~master: building configuration "default"...
danode\cgi.d(110,58): Error: template std.math.fmin cannot deduce function from argument types !()(long, ulong), candidates are:
C:\Users\me\scoop\apps\dmd\current\windows\bin....\src\phobos\std\math.d(7267,3): fmin(F)(const F x, const F y)
with F = ulong
must satisfy the following constraint:
__traits(isFloating, F)
danode\filesystem.d(118,76): Error: template std.math.fmin cannot deduce function from argument types !()(long, ulong), candidates are:
C:\Users\me\scoop\apps\dmd\current\windows\bin....\src\phobos\std\math.d(7267,3): fmin(F)(const F x, const F y)
with F = ulong
must satisfy the following constraint:
__traits(isFloating, F)
danode\filesystem.d(120,70): Error: template std.math.fmin cannot deduce function from argument types !()(long, ulong), candidates are:
C:\Users\me\scoop\apps\dmd\current\windows\bin....\src\phobos\std\math.d(7267,3): fmin(F)(const F x, const F y)
with F = ulong
must satisfy the following constraint:
__traits(isFloating, F)
danode\payload.d(42,48): Error: template std.math.fmin cannot deduce function from argument types !()(long, ulong), candidates are:
C:\Users\me\scoop\apps\dmd\current\windows\bin....\src\phobos\std\math.d(7267,3): fmin(F)(const F x, const F y)
with F = ulong
must satisfy the following constraint:
__traits(isFloating, F)
dmd failed with exit code 1.
systeminfo - OS Version: 10.0.19042 N/A Build 19042
λ dmd --version
DMD32 D Compiler v2.094.2-dirty
Copyright (C) 1999-2020 by The D Language Foundation, All Rights Reserved written by Walter Bright
λ dub --version
DUB version 1.23.0, built on Nov 20 2020
Line 188 in b12e895
This line of code I (un)comment a lot for, some weird reason, make it a command line switch !
Long term goal to run Bludit CMS on DaNode
HTTPs connections can crash the web server.
Low importance issue.
[issue's title says it all, look up the video below.]
Somehow I suspect that this has to do with the Web Server. (DaNode)
Haven't tested on Apache or other Web Servers yet.
But it (HTML video tag) seems to work perfectly for everyone else that do not use DaNode.
Guide to reproduce
Temporary live version. (1-2 days)
<video width="320" height="240" controls>
<source src="1.mp4" type="video/mp4">
<source src="1.ogg" type="video/ogg">
Your browser does not support the video tag.
</video>
We should add all known file mime-types to danode/mimetypes.d
After adding index.html
file and visiting the 78.150.536.25/index.html
via a browser I get this error.
Also I've noticed that I get an error on startup and every time I try to visit a web page.
[WARN] unknown client exception: core.time.TimeException@std/datetime/date.d(3776): 255 is not a valid month of the year.
----------------
??:? pure @safe void std.datetime.date.enforceValid!("months").enforceValid(int, immutable(char)[], ulong) [0x559cb55792e3]
??:? pure ref @safe std.datetime.date.Date std.datetime.date.Date.__ctor(int, int, int) [0x559cb5577b86]
??:? pure ref @safe std.datetime.date.DateTime std.datetime.date.DateTime.__ctor(int, int, int, int, int, int) [0x559cb5577365]
danode/functions.d:23 std.datetime.systime.SysTime danode.functions.parseHtmlDate(const(immutable(char)[])) [0x559cb547d9ed]
danode/request.d:145 const @property std.datetime.systime.SysTime danode.request.Request.ifModified() [0x559cb554d33c]
danode/response.d:175 void danode.response.serveStaticFile(ref danode.response.Response, in danode.request.Request, danode.filesystem.FileSystem) [0x559cb554f6ec]
danode/router.d:105 void danode.router.Router.deliver(ref danode.request.Request, ref danode.response.Response, bool) [0x559cb5550352]
danode/router.d:55 void danode.router.Router.route(danode.interfaces.DriverInterface, ref danode.request.Request, ref danode.response.Response, long) [0x559cb554fe0f]
danode/client.d:44 void danode.client.Client.run() [0x559cb547be76]
??:? void core.thread.context.Callable.opCall() [0x559cb5560fe4]
??:? thread_entryPoint [0x559cb5560ac2]
??:? [0x7fc04afe8fa2]
??:? clone [0x7fc04ad6d4ce]
[WARN] unknown client exception: core.time.TimeException@std/datetime/date.d(3776): 255 is not a valid month of the year.
----------------
??:? pure @safe void std.datetime.date.enforceValid!("months").enforceValid(int, immutable(char)[], ulong) [0x559cb55792e3]
??:? pure ref @safe std.datetime.date.Date std.datetime.date.Date.__ctor(int, int, int) [0x559cb5577b86]
??:? pure ref @safe std.datetime.date.DateTime std.datetime.date.DateTime.__ctor(int, int, int, int, int, int) [0x559cb5577365]
danode/functions.d:23 std.datetime.systime.SysTime danode.functions.parseHtmlDate(const(immutable(char)[])) [0x559cb547d9ed]
danode/request.d:145 const @property std.datetime.systime.SysTime danode.request.Request.ifModified() [0x559cb554d33c]
danode/response.d:175 void danode.response.serveStaticFile(ref danode.response.Response, in danode.request.Request, danode.filesystem.FileSystem) [0x559cb554f6ec]
danode/router.d:105 void danode.router.Router.deliver(ref danode.request.Request, ref danode.response.Response, bool) [0x559cb5550352]
danode/router.d:55 void danode.router.Router.route(danode.interfaces.DriverInterface, ref danode.request.Request, ref danode.response.Response, long) [0x559cb554fe0f]
danode/client.d:44 void danode.client.Client.run() [0x559cb547be76]
??:? void core.thread.context.Callable.opCall() [0x559cb5560fe4]
??:? thread_entryPoint [0x559cb5560ac2]
??:? [0x7fc04afe8fa2]
??:? clone [0x7fc04ad6d4ce]
[WARN] unknown client exception: core.time.TimeException@std/datetime/date.d(3776): 255 is not a valid month of the year.
----------------
??:? pure @safe void std.datetime.date.enforceValid!("months").enforceValid(int, immutable(char)[], ulong) [0x559cb55792e3]
??:? pure ref @safe std.datetime.date.Date std.datetime.date.Date.__ctor(int, int, int) [0x559cb5577b86]
??:? pure ref @safe std.datetime.date.DateTime std.datetime.date.DateTime.__ctor(int, int, int, int, int, int) [0x559cb5577365]
danode/functions.d:23 std.datetime.systime.SysTime danode.functions.parseHtmlDate(const(immutable(char)[])) [0x559cb547d9ed]
danode/request.d:145 const @property std.datetime.systime.SysTime danode.request.Request.ifModified() [0x559cb554d33c]
danode/response.d:175 void danode.response.serveStaticFile(ref danode.response.Response, in danode.request.Request, danode.filesystem.FileSystem) [0x559cb554f6ec]
danode/router.d:105 void danode.router.Router.deliver(ref danode.request.Request, ref danode.response.Response, bool) [0x559cb5550352]
danode/router.d:55 void danode.router.Router.route(danode.interfaces.DriverInterface, ref danode.request.Request, ref danode.response.Response, long) [0x559cb554fe0f]
danode/client.d:44 void danode.client.Client.run() [0x559cb547be76]
??:? void core.thread.context.Callable.opCall() [0x559cb5560fe4]
??:? thread_entryPoint [0x559cb5560ac2]
??:? [0x7fc04afe8fa2]
??:? clone [0x7fc04ad6d4ce]
[WARN] unknown client exception: core.time.TimeException@std/datetime/date.d(3776): 255 is not a valid month of the year.
----------------
??:? pure @safe void std.datetime.date.enforceValid!("months").enforceValid(int, immutable(char)[], ulong) [0x559cb55792e3]
??:? pure ref @safe std.datetime.date.Date std.datetime.date.Date.__ctor(int, int, int) [0x559cb5577b86]
??:? pure ref @safe std.datetime.date.DateTime std.datetime.date.DateTime.__ctor(int, int, int, int, int, int) [0x559cb5577365]
danode/functions.d:23 std.datetime.systime.SysTime danode.functions.parseHtmlDate(const(immutable(char)[])) [0x559cb547d9ed]
danode/request.d:145 const @property std.datetime.systime.SysTime danode.request.Request.ifModified() [0x559cb554d33c]
danode/response.d:175 void danode.response.serveStaticFile(ref danode.response.Response, in danode.request.Request, danode.filesystem.FileSystem) [0x559cb554f6ec]
danode/router.d:105 void danode.router.Router.deliver(ref danode.request.Request, ref danode.response.Response, bool) [0x559cb5550352]
danode/router.d:55 void danode.router.Router.route(danode.interfaces.DriverInterface, ref danode.request.Request, ref danode.response.Response, long) [0x559cb554fe0f]
danode/client.d:44 void danode.client.Client.run() [0x559cb547be76]
??:? void core.thread.context.Callable.opCall() [0x559cb5560fe4]
??:? thread_entryPoint [0x559cb5560ac2]
??:? [0x7fc04afe8fa2]
??:? clone [0x7fc04ad6d4ce]
Now who would not want to have an accessible video file.
Today I really had a need to test out if DaNode would let me look at things such as images and videos on the web server.
After some uploads, only the .png image file was accessible. The .mp4 file was blocked off. Not sure how to go about it.
http://78.140.136.25/1.mp4 This is a working link to a file that is .mp4 media. (Resource is Inaccessible)
http://78.140.136.25/2.png Now the .png media file seems to show properly. (Resource is Accessible)
I suspect that mimetypes.d are lacking entry of .mp4
https://github.com/DannyArends/DaNode/blob/b12e8950e90ffaf9f86f5cf6c72d0bd2e5f08d8f/danode/mimetypes.d
Here you can see me placing a file named 123 123
into ./www/*/
directory
The requested file is not found on the server due to browsers HTML URL Encoding.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.