Android Question Post request is received as GET on the server side after activating SSL?

Gabino A. de la Gala

Well-Known Member
Licensed User
Longtime User
After taking a few days making changes in part B4A I found a "mystery".

The POST requests that until the activation of the SSL were received correctly on the server side, after activating the SSL (or at least that seems to me) on the server side are received as GET.

Is that behavior normal?

I apologize in advance if I am asking an obvious question.

Thank you.
 

Gabino A. de la Gala

Well-Known Member
Licensed User
Longtime User
I think I have already found the point at which the change from POST to GET occurs. It is in the HttpsFilter:

B4X:
'Return True to allow the request to proceed.
Public Sub Filter(req As ServletRequest, resp As ServletResponse) As Boolean
    Log(req.ParameterMap)
    Log("HttpsFilter: " & req.Method)
    If req.Secure Then
        Return True
    Else
        resp.SendRedirect(req.FullRequestURI.Replace("http:", "https:") _
       .Replace(Main.SRVR.Port, Main.SRVR.SslPort))
        Return False
    End If
End Sub

If the original call I make it on the https url it works, but if I do it on the http, then the change of the POST to the GET takes place

To the httpsfilter arrives as a POST but it seems that the method change occurs in the SendRedirect.

Could be?
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…