HTTPS keeps jumping to HTTP?

HTTPS keeps jumping to HTTP?

when loged into my app, connected via HTTPS,
and i click any button it tries opening the next page via HTTP.

has anyone got an idea why this could be happening?

im running version
i have a class1 server certificate installed
and set the http security of all web flows to SSL

thank you!
Hi enigma,

There's no obvious reason for that to happen.
What did you set as desitnation for your button clicks? And if it's an action, how does it end? Is it with a Go To Screen node?
i created the buttons by drag-droping the according screen to the top menu
the link/s itsself has the following settings:
visible and enabled = true
method = navigate
destination = MainFlow\Screen

the only action triggered by the click, would be the preparation of the destination screen

what i recently discovered:
- when i login, and click on "MyInfo" (on the top right) -> it works
- then i click on menu item 1 -> works
- now i click on menu item 2 -> doesnt work (jumps to HTTP)
- then i can go back or adapt HTTP to HTTPS in the url
- now the screen loads, but from now on, i can click on anything (including myinfo) and it doesnt work anymore

Well i had a similar problem a few months ago, but was with a different version of the platform.
At the time the problem was the error handler, if you where on the application and for example a "security exception" occurred the https protocol would drop, in my case the security exceptions for example don't generate log what made the problem hard to find.

Could this be happening to you to ?

In my case we needed to change the system component extension “HttpRequestHandler”, the action GetURL :

public void MssGetURL(out string ssURL) {
           ssURL = HttpContext.Current.Request.Url.ToString();

           if (RuntimePlatformUtils.RequestIsSecure(HttpContext.Current.Request))
               /* GenericExtendedActions.Audit(AppInfo.GetAppInfo().OsContext, "Original URL is: " + ssURL, "GetEntryURL"); */
               if (ssURL.StartsWith("http://"))
                   /* replace http with https */
                   ssURL = ssURL.Substring(7);
                   ssURL = "https://" + ssURL;
               else if (ssURL.StartsWith("/"))
                   /* relative URL - need to add https:// + hostname before URL */
                   ssURL = "https://" + HttpContext.Current.Request.Url.Host + ssURL;
                   /* do nothing, already using HTTPS */
               /* GenericExtendedActions.Audit(AppInfo.GetAppInfo().OsContext, "New URL is: " + ssURL, "GetEntryURL"); */


Hope this helps :) !!!

You should also submit
this issue to the outsystems support.

I just checked the current implementation for GetUrl and it has code to maintain the http(s) of the request.
So that should not be the problem.

Anyway try debugging the espace and turning the "Break on all exceptions" option to see if its some case of exception redirect.
Or try to replicate it in a simple example so we can see the eSpace.

João Rosado
hi joao

ive attached a test espace i created
the debugger wont react, even with halt on all errors on
also none of the screen action error handlers reacted (in the original espace)

the strange thing in this test espace:
after login, you can jump arround screen1, 2 and myinfo without problems
but, when i click logout, it jumps to HTTP
intersting thaught goncalo

i was having problems with messagequeue privileges before
but now we got them working again

so it would be a little strange if HTTPS/HTTP worked before
and now that the queues seem to be working again,
HTTPS/HTTP starts jumping arround because of that¿

your suggested solution, would require MssGetURL to be called, instead of GetURL
is that right?
Hi enigma,

Please don't mess around with HttpRequestHandler.

In your test espace you get that behavior in the logout because the login page is marked as Http Security None.

Change it to the empty value to inherit from the webflow and its fixed.
Check if you dont have screens marked like that in your eSpace.

I'm not sure why that specific page has that default.

João Rosado
Hy Enigma,

João Rosado already checked that the code in your version is correct so i think that now it is a question of checking the flows.

And it is true we shouldn’t mess with HttpRequestHandler since it is a system component and every time you make an upgrade  the system components will always be published with the upgrade version, meaning that you lose all the changes you did. Between the MssGetURL is the implementation of the GetURL() action on the extension.

I remenber now that we also had to change the login flow, we needed to add the GetURL() action to forward the user to the correct screen, this action will help by keeping the protocol that is currently in session, if i am not mistaken.

Check your login logic and if you need add the GetURL() so that when the user is redirected with http or https.
hi joao

indeed a special default setting =)

i tried changing to inherit the SSL from the flow
couldnt find other screens with none set

yet the HTTPS/HTTP bug still occurs
hi goncalo

the login logic uses GetOwnerURLPath(), if there isnt already one set
but for the login itsself im not experiencing the issue - i get redirected properlly

the buttons use the navigate method to trigger the next screen
but here i cant define https nor http

i tried setting breakpoints on the buttons
if the https redirect works, the breakpoint is triggered etc (all seems ok)
but when it redirects to http, the breakpoint isnt triggered at all
woohoo! i just upgraded from to and it works now! =)

thank you two for your help