joewalnes / websocketd

Turn any program that uses STDIN/STDOUT into a WebSocket server. Like inetd, but for WebSockets.
http://websocketd.com/
BSD 2-Clause "Simplified" License
17.14k stars 1.01k forks source link

CGI scripts on windows #384

Closed sectokia closed 3 years ago

sectokia commented 4 years ago

How do you get CGI scripts to work on windows?

For example if --cgidir=foo and you have a foo\bar.pl and in your browser go to http://host/bar.pl then websocketd says "%1 is not a valid win32 application".

How to get websocketd to use the shebang in the perl script first line to run perl on the script? Or can cgi only run actual executables?

asergeyev commented 4 years ago

https://stackoverflow.com/questions/4727480/how-do-i-make-my-perl-scripts-act-like-normal-programs-on-windows

I wonder if this helps to get to what you want.

asergeyev commented 4 years ago

But overall it seems quite complex so maybe you would have bat or cmd script instead which would run perl interpreter for proper script?