B4J Question [SOLVED] Uploading a file with http on a SSL started jServer

alwaysbusy

Expert
Licensed User
Longtime User
When jServer is started with SSL, the ServletRequest in the upload handler looses the session.

I first thought this was a problem in my WebApp, but it looks like I can reproduce this with the ServerExampleNoMySQL.zip from the Web Apps tutorial too (https://www.b4x.com/android/forum/threads/webapp-web-apps-overview.39811/)

Situation:

In the WebSocketWithFileUpload class, a session variable for the callback is set:
B4X:
ws.Session.SetAttribute("file_upload_sender", Me)

In the FileHelper class it is retrieved to be used in the CallSub
B4X:
Dim callback As Object = req.GetSession.GetAttribute("file_upload_sender")

Results:

When calling https://localhost:51143/websocket_with_fileupload/, everything works as expected.

But when calling http://localhost:51042/websocket_with_fileupload/, the value of callback is null.

Maybe something changed when Jetty was upgraded?
 
Top