*plus/Web/request and redirections

Started by Stéphane Devouard, May 19, 2022, 08:58:39 AM

Previous topic - Next topic

Stéphane Devouard

I just noticed an issue with *plus/web/request

An home page I am trying to get has the following pattern :
https://our.domain.com/somescript.php?pg=somepage

I was doing a GET with the utility to the domain as it is stored in the configuration files, ie
https://our.domain.com

The request returns a 301 status with a
Location: somescript.php?pg=somepage HTTP header

So *plus/web/request follows it, but instead of trying :
https://our.domain.com/somescript.php?pg=somepage

It tries :
somescript.php?pg=somepage

Which obviously fails and returns a "Cannot contact host server" error
I have worked around the issue by requesting the whole home page URL in the first place instead of just the domain name URL

You may however want to enhance the redirection following logic in a future version
Stéphane Devouard
Portfolio | Work