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

T Lee Davidson t.lee.davidson at gmail.com
Sun Jun 5 19:41:57 CEST 2022


I am using the Example (with Main.webpage and Page.webpage) at http://gambaswiki.org/wiki/doc/webpage


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.

BTW, whether it works as expected or not, the IDE Console *always* says, "gb.httpd: bind 0.0.0.0 - Address already in use"


Issue #2: The server does not correctly load the project's stylesheet, "style.css".

I created the stylesheet with: right-click on Project > New > Style sheet...

Firefox refuses to load the stylesheet saying:
The stylesheet localhost:8080/style.css was not loaded because its MIME type, “text/html”, is not “text/css”.

SeaMonkey shows it has loaded a style.css file, but the content is the exact same as the page source (and, of course, that mime 
type would be “text/html”). I understand this can happen with some browsers when the stylesheet is linked with an empty string 
given for 'href', ie. <link rel="stylesheet" href="">


Are my expectations wrong? Does the Example need to be corrected? Or, are these potential bugs?


-- 
Lee


More information about the User mailing list