Webserver

Questions and comments specific to a particular plugin should go here.
Mikey
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
kgschlosser
Site Admin
Posts: 5508
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

reaper
Posts: 27
Joined: Sun Jul 31, 2011 10:15 am

Re: Webserver

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

Hello,

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:192.168.0.11', 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!

reaper
Posts: 27
Joined: Sun Jul 31, 2011 10:15 am

Re: Webserver

Post by reaper » Mon Sep 07, 2020 9:54 am

Is someone interested on solving this issue?

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

Re: Webserver

Post by kgschlosser » Mon Sep 07, 2020 5:14 pm

I will make some changes to it and we can see if it will fix these issues.
If you like the work I have been doing then feel free to Image

reaper
Posts: 27
Joined: Sun Jul 31, 2011 10:15 am

Re: Webserver

Post by reaper » Mon Sep 07, 2020 7:04 pm

Awesome! :D

reaper
Posts: 27
Joined: Sun Jul 31, 2011 10:15 am

Re: Webserver

Post by reaper » Sun Nov 01, 2020 9:30 pm

Any news? :-)

007craft
Posts: 19
Joined: Tue May 28, 2019 9:30 pm

Re: Webserver

Post by 007craft » Wed Jun 02, 2021 10:39 pm

Does anybody know how I send a response from a Get command?

I use curl to send a get request to eventghost. Eventghost webserver successfully gets an event! But the response I get on the computer that send the request is always 404 as shown below.

C:\Programs\curl-7.59.0-win64-mingw\bin\curl -X GET http://192.168.1.101:8880/?test
<head>
<title>Error response</title>
</head>
<body>
<h1>Error response</h1>
<p>Error code 404.
<p>Message: File not found.
<p>Error code explanation: 404 = Nothing matches the given URI.
</body>

How to fix this? And also send a message as a response. I tried Webserver: Broadcast message: returne test - but still only see the 404 message on the computer I send from

User avatar
Sem;colon
Plugin Developer
Posts: 887
Joined: Sat Feb 18, 2012 10:51 am
Location: Germany

Re: Webserver

Post by Sem;colon » Thu Jun 03, 2021 8:13 am

Hi 007craft,
You need to place a file called index.html (can be an empty file) in the document root location you selected in the plugin. ;)
If you like my work, Image me a drink :wink:

reaper
Posts: 27
Joined: Sun Jul 31, 2011 10:15 am

Re: Webserver

Post by reaper » Fri Jul 02, 2021 5:00 pm

Is there an update to the open socket issue on standby/hibernate?
viewtopic.php?f=9&t=1663&start=330#p55107

Post Reply