HTML Links in Brook or fpWeb "session"
lazarus / 38-Networking and Web Programming
----------------------------------------------------------------------
RedOctober · 2021-03-23 23:42
Platform: Lazarus 2.0.10, FPC 3.2.0 Brook 5 Framework 5.4.7
I'm sure fpWeb has this same situation.
I have a Brook 5 server running. I hit it with a request from my
browser. A page is returned from the Brook 5 Server app. The
returned page has a link in it (with a target of _blank) that is
directed to www.google.com. I click the link, and the browser tries
to open the link, but it can't bc the local path to the Brook 5 Server
is prepended to the link. Let's say my initial page was:
https://localhost/arr
(I get the page back with the link in it)
I click the link, trying to get to www.google.com
But the link is prepened as follows:
https://localhost/arr/www.goole.com
How can I construct the URL, or change some setting, to tell the
browser to just go to the URL listed in the tag, and not prepend
it with the domain and protocol of the container page?
Thanks in advance.
----------------------------------------------------------------------
egsuh · 2021-03-24 04:48
Can you show me the "response" content from web server? There are no
such thing in fpweb.
----------------------------------------------------------------------
PierceNg · 2021-03-24 05:06
Quote from: RedOctober on March 24, 2021, 12:42:15
amhttps://localhost/arr/www.goole.com
If the HTML returned by the server says
then the browser will open in your case .
If the URL is specified fully in the HTML, like then the browser will open that
URL.
----------------------------------------------------------------------
RedOctober · 2021-03-24 15:04
PierceNG got it. I prefixed with the protocol and it's OK now.
Thanks for that. I knew it was something simple.
I seem to remember back in the day when I was building small stand
alone servers using Delphi and IntraWeb I had the same problem. So I
assumed all stand alone Microsoft Windows .exe servers had this
issue. If I wrongly accused fpWeb, my apologies.