[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gb.web WebPage.Render problem on Apache
[Thread Prev] | [Thread Next]
- Subject: Re: gb.web WebPage.Render problem on Apache
- From: T Lee Davidson <t.lee.davidson@xxxxxxxxx>
- Date: Mon, 25 Mar 2024 22:31:22 -0400
- To: user@xxxxxxxxxxxxxxxxxxxxxx
On 3/25/24 12:08, T Lee Davidson wrote:
If a WebPage is set as the startup class, files in the .Public directory are served properly. But, if another module calls WebPage.Render on that same page, the files are not served up properly. IIRC, I've run into an issue similar to this before running a gb.web app on Apache, but I think it got fixed.The attached project has a MainPage webpage and a Main module that calls MainPage.Render. With MainPage set as the startup class, the application works fine. If Main is set as startup, it does not.Perhaps I am misunderstanding the intended use of .Render().
Well it's not just Apache. Lighttpd behaves that way too. I think I was deceived by how well it worked with gb.httpd. The application serves the MainPage for every request because ... that's what I have told it to do. Duh.So the question now is, how can I use a Module as a router to decide what WebPage to serve and just hand the processing off to that WebPage? Or is that not possible, and I would have to parse and handle every request?
I tried this: [code] Public Sub Main() If IsNull(Request.Path) Or If Request.Path = "/" Then MainPage.Render Else ' Let the WebPage handle everything else Endif End [/code] but I got a 500 Internal Error: "End of script output before headers" -- Lee --- Gambas User List Netiquette [https://gambaswiki.org/wiki/doc/netiquette] ---- --- Gambas User List Archive [https://lists.gambas-basic.org/archive/user] ----
Re: gb.web WebPage.Render problem on Apache | T Lee Davidson <t.lee.davidson@xxxxxxxxx> |
gb.web WebPage.Render problem on Apache | T Lee Davidson <t.lee.davidson@xxxxxxxxx> |
Re: gb.web WebPage.Render problem on Apache | T Lee Davidson <t.lee.davidson@xxxxxxxxx> |