Questions and comments specific to a particular plugin should go here.
Posts: 2
Joined: Fri Nov 01, 2019 9:07 am

Re: Webserver

Post by Mikey » Tue Nov 05, 2019 7:56 am

That works beautifully - thank you kindly, good sir!

User avatar
Site Admin
Posts: 5395
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Webserver

Post by kgschlosser » Tue Nov 05, 2019 10:16 am

Does it really?? :shock:
I never tested it. It looked like it should work. I write the thing to work in a different way and I didn't like it because you would have had to modify the script if you wanted to make any changes and it could get confusing if you had a large number of errors you wanted to support. It could have ended up being a mess. So I thought the file thing would be the right way to go about it. and it is dynamic so you can add or remove supported errors by simply adding or removing a file. and the file is an html file to testing the output would be a snap. and you can use your favorite html editor to edit the thing.

I usually type in a slew of comments as to what is going on. but since there should be no real need to edit the thing i didn't see the need to do a step by step in it.

Also.. You can test this as well. If you disable the webserver plugin and then enable it again it should continue to work properly. The reason for that is if you modify the config settings it is going to restart the plugin the same as disabling/enabling it. So if you decided to move the root of the website to a different location it should follow the new path you set in the webserver plugin..
If you like the work I have been doing then feel free to Image

Posts: 11
Joined: Sun Jul 31, 2011 10:15 am

Re: Webserver

Post by reaper » Thu May 21, 2020 8:35 am


your plugin is very useful - great job!

There's one issue:
If Windows goes to standby or hibernate and a client has still an open socket e. g. if the web page is still opened in Microsoft Edge an exception is thrown:
08:01:11 HTTP.Stopped 'Webserver on port 80 stopped'
08:01:31 ----------------------------------------
08:01:31 Exception happened during processing of request from ('::ffff:', 50993, 0, 0)
08:01:31 Traceback (most recent call last):
08:01:31 File "SocketServer.pyc", line 596, in process_request_thread
08:01:31 File "SocketServer.pyc", line 331, in finish_request
08:01:31 File "SocketServer.pyc", line 652, in __init__
08:01:31 File "BaseHTTPServer.pyc", line 340, in handle
08:01:31 File "C:\Program Files (x86)\EventGhost\plugins\Webserver\__init__.py", line 1044, in handle_one_request
08:01:31 unicode(exc)
08:01:31 UnicodeDecodeError: 'ascii' codec can't decode byte 0xfc in position 21: ordinal not in range(128)
08:01:31 ----------------------------------------

A fix would be highly appreciated!

Post Reply