[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

'gb.httpd' embedded web server evolutions


Hi,

Until now, debugging projects based on 'gb.web' or 'gb.web.gui' (which itself is based on 'gb.web') from the IDE was done through the 'gb.httpd' component, which integrates an embedded HTTP server inside your project.

In that case, when your project is started, it's the internal HTTP server that is run forever, and that will fork itself to handle each request by running the startup class of your project.

So that you can put breakpoints, the embedded server serializes requests. But then, some other things, like file uplpoad, start to fail. HTTP requets are supposed to be run independently.

To fix that problem, I removed the request serialization trick from 'gb.httpd'.

I also modified the IDE so that debugging projects based on 'gb.web' and 'gb.web.gui' now relies on external debugging instead of normal debugging.

It's not perfect yet, as external debugging can only stop at breakpoints or STOP instructions. In other words starting the debugger with the "step" button has the same effect has starting it with the "run" button. It does not stop on the first line on its own.

But now your project can be run on its own without the need of a real web server:

$ GB_HTTPD_PORT=8080 gbr3 -H ./mywebapp.gambas

...except if you need HTTPS, for example, as the embedded web server, which is relatively simple, does not support it.

It's a work in progress, so questions and comments are welcomed!

Regards,

--
Benoît Minisini.


Follow-Ups:
Re: 'gb.httpd' embedded web server evolutionsBenoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx>