On Thu, Dec 12, 2019 at 03:30:50PM +0000, Jose Isaias Cabrera wrote: > Old to MS DOS, but newbie to FreeDOS. Is there a webserver written and run > purely on FreeDOS? I have done a few searches, but don't see anything in the > various apps sites. Thanks.
You can use TCL for DOS (I guess so): #v+ proc Serve {chan addr port} { fconfigure $chan -translation auto -buffering line set line [gets $chan] set path [file join . [string trimleft [lindex $line 1] /]] if { [catch { set fl [open $path] } err] } { puts $chan "HTTP/1.0 404 Not Found" } else { puts $chan "HTTP/1.0 200 OK" puts $chan "Content-Type: text/html" puts $chan "" puts $chan [read $fl] close $fl } close $chan } set sk [socket -server Serve 5151] vwait forever #v- A complete webserver. Works under Linux, didn't try it yet under DOS control -- regards, Zbigniew _______________________________________________ Freedos-user mailing list Freedos-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-user