Change in HTTP-library breaks my code

moster67

Expert
Licensed User
Longtime User
There seems to be a change in the HTTP-library which breaks my code.

I can't reproduce it easily since the HTTP-library is used to connect to a satellite-decoder (within a LAN) but with version 1.02 it works while 1.04 and 1.06 will not work.

Basically, my program changes a channel on the decoder and it will work the first time but then if I want to change channel again, it will simply time-out. However, using version 1.02 it works flawlessly. The code is always the same.

Part of the code is as follows:

B4X:
Dim request As HttpRequest
URLZap = "http://" & main.boxip & ":" & main.boxport &  "/cgi-bin/zapTo?path=" & myChanCode

request.InitializeGet(URLZap)
   request.Timeout = 5000 'set timeout to 5 seconds
   If HttpChanClient1.ExecuteCredentials(request,2,main.BoxUser,main.BoxPassword)=False Then Return 

ProgressDialogShow("changing channel")

From version 1.03 up to the most recent one, did you change anything particular in the library which I might need to take into consideration when writing my code?

PS: another odd thing is that not all users are suffering from this problem.
 
Last edited:

Erel

B4X founder
Staff member
Licensed User
Longtime User
There was a change in the way that credentials are handled.
Previously the credentials were always sent using Basic method.
Now the request is first sent without any credentials. The server is supposed to respond with 401 error and with the required authentication method. Then a second request is sent with the credentials being sent in either Basic or Digest method based on the server response.
 
Upvote 0

moster67

Expert
Licensed User
Longtime User
Is it possible to log (using logcat) from my Android-app the reply from the server (refering to "The server is supposed to respond with 401 error and with the required authentication method")?
 
Upvote 0

moster67

Expert
Licensed User
Longtime User
OK, I will try that....in the meantime I am keeping jealously a copy of the 1.02 version
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…