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

T Lee Davidson t.lee.davidson at gmail.com
Tue Jun 7 16:00:26 CEST 2022


On 6/7/22 08:45, Benoit Minisini wrote:
> Le 07/06/2022 à 03:21, T Lee Davidson a écrit :
>> On 6/6/22 17:00, Benoit Minisini wrote:
>>> Le 05/06/2022 à 19:41, T Lee Davidson a écrit :
>>>> I am using the Example (with Main.webpage and Page.webpage) at http://gambaswiki.org/wiki/doc/webpage
>>>
>>> This is not a working example, it's just to show what the syntax is.
>>
>> Hmm. It actually does work ... when the server does :-)
>>
>>
>>>> Issue #1: The server is unreliable, behaving inconsistently when sending the page to the browser.
>>>>
>>>> Sometimes the page loads in the browser; sometimes not. When it does not, the browser says, "Waiting for localhost" 
>>>> virtually indefinitely. Clicking the Stop button in either the browser or the IDE will result in the page being rendered in 
>>>> the browser (albeit with a "not fully loaded" error in the Firefox console). I've tried three different browsers, and they 
>>>> all experience this issue.
>>>
>>> Please post a full project.
>>
>> The attached project is simply that very example with an added style.css file.
>>
> 
> 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'?


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.

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.


-- 
Lee


More information about the User mailing list