httputils2: oddities after upgrade

ziomorgan

Active Member
Licensed User
Longtime User
Hello to all,
after the latest updates IDE I have a project that behaves in an unusual way: if I make a simple GET (job.download) with wifi everything is ok and if I do I get error 406 with 3G.
Currently I have version 2.71 and use the code uttputils2 instead of the library.
Does anyone know what could it be?
thanks
 

ziomorgan

Active Member
Licensed User
Longtime User
yes i can.
Which agent header I have to add?
Why before I could access without having to enter an agent header?
Thanks for the speed
 
Upvote 0

ziomorgan

Active Member
Licensed User
Longtime User
I tried it with agent header but no luck.
What else could it be?
Why it worked before and not now?
The app also uses other than to download even multipart requests that continue to operate normally
Thank you for the help
 
Upvote 0

ziomorgan

Active Member
Licensed User
Longtime User
I have tried using the app developed in xcode with the same operator and continues to operate while in Android not only goes 3g ...
The customer goes online with the site that collects the data of the app today at 12 and I'm in a panic ...
How can I do?
 
Upvote 0

ziomorgan

Active Member
Licensed User
Longtime User
Here is the sample project to reproduce the problem.

B4X:
#Region Module Attributes
    #FullScreen: False
    #IncludeTitle: True
    #ApplicationLabel: HttpUtils2
    #VersionCode: 1
    #VersionName:
    #SupportedOrientations: unspecified
    #CanInstallToExternalStorage: False
#End Region

'Activity module
Sub Process_Globals
End Sub
Sub Globals
End Sub
Sub Activity_Create(FirstTime As Boolean)
    Dim job1, job2, job3 As HttpJob
    'job1.Initialize("Job1", Me)
 
    'Send a GET request
    'job1.Download2("http://www.b4x.com/print.php", _
    '    Array As String("first key", "first value :)", "second key", "value 2"))
 
    'Send a GET request
    job3.Initialize("Job3", Me)
    job3.Download("http://www.******.com")
    job3.GetRequest.SetHeader("User-Agent", "Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; Trident/6.0)")
    job3.GetRequest.SetHeader("Accept ", "*/*")
End Sub
Sub JobDone (Job As HttpJob)
    Log("JobName = " & Job.JobName & ", Success = " & Job.Success)
    If Job.Success = True Then
        Select Job.JobName
            Case "Job1", "Job2", "Job3"
                'print the result to the logs
                ToastMessageShow(Job.GetString,True)
        End Select
    Else
        Log("Error: " & Job.ErrorMessage)
        ToastMessageShow("Error: " & Job.ErrorMessage, True)
    End If
    Job.Release
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
 
Last edited:
Upvote 0

ziomorgan

Active Member
Licensed User
Longtime User
EUREKA !!!!
My manager (TIM) has changed the default apn from ibox to wap.
As soon as I entered again ibox everything went smoothly
Thank you very much for Erel for the infinite availability.
 
Upvote 0
Top