[Gambas-user] Issues using embedded HTTP server with gb.web WebPage

Benoit Minisini benoit.minisini at gambas-basic.org
Wed Jun 8 00:32:09 CEST 2022

Le 07/06/2022 à 16:00, T Lee Davidson a écrit :
>> The 'style.css' must be in the 'Public' directory. Files located in 
>> that directory are shared through HTTP. Other project files aren't.
> Okay. That explains why the stylesheet wasn't being loaded correctly. 
> Thank you.
> But, then why does the 'Project' directory's context-sensitive menu 
> offer the very same options as the 'Public' directory (eg. to create a 
> New style sheet among others) if those types of files should be in 
> 'Public' instead of '.hidden'?

The 'Project' directory contains any file you need for the development 
of your project, but that is not needed for running it.

Why wouldn't you need to create a style sheet file there?

> And, do you have any idea why thttpd is behaving inconsistently? For 
> example, I just fixed the style.css file location and executed the app 
> to verify. It initially loaded in the browser as expected. Then I 
> clicked the browser's reload button. The server responded correctly on 
> the first two reloads, but on the third and subsequent reload attempts 
> it failed to respond.

Strange, I don't remember having such a problem. Which browser do you use?

> I tried looking at the code, but it is a bit difficult for me to 
> comprehend. I may have seen a connection limit or similar. Perhaps there 
> is a security feature intended to prevent a D.O.S. attack.

The embedded HTTP server is made with the source code of 'thttpd' that I 
modified so that it serves only one CGI request at once, so that 
debugging is easier. Maybe this behaviour is related to your problem?

Benoît Minisini.

More information about the User mailing list