ReceiveHTTPMemory fails a lot of time

Windows specific forum
Mesa
Enthusiast
Enthusiast
Posts: 433
Joined: Fri Feb 24, 2012 10:19 am

ReceiveHTTPMemory fails a lot of time

Post by Mesa »

ReceiveHTTPMemory fails a lot of time but not all the time.
Is that a bug ?
It worked before pb 5.72

I use pb5.72 lts x86 on xp 32b.

Code: Select all

InitNetwork()
; url$="http://www.purebasic.com/index.php"; fails
; url$="https://www.google.com";ok
; url$="http://www.google.com";ok
url$="https://upload.wikimedia.org/wikipedia/commons/0/02/SVG_logo.svg"; fails

  *Buffer = ReceiveHTTPMemory(url$)
  If *Buffer
    Taille = MemorySize(*Buffer)
    Debug  PeekS(*Buffer, Taille, #PB_UTF8|#PB_ByteLength)
    FreeMemory(*Buffer)
  Else
    Debug "Failed"
  EndIf
M.
User avatar
Naheulf
User
User
Posts: 27
Joined: Sat Oct 18, 2014 8:37 am

Re: ReceiveHTTPMemory fails a lot of time

Post by Naheulf »

Tested 2 times for each url : 8 success, 0 fail

I use PureBasic LTS 5.72 x64 on windows 8.1 64 bits
Please correct me if my English is bad.
User avatar
mk-soft
Always Here
Always Here
Posts: 6204
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

Re: ReceiveHTTPMemory fails a lot of time

Post by mk-soft »

Does not run on XP (x86) with any version of PB.

Probably has to do with the SSL security level, which is no longer supported by XP.
Must find an update for XP.
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
User avatar
kenmo
Addict
Addict
Posts: 2033
Joined: Tue Dec 23, 2003 3:54 am

Re: ReceiveHTTPMemory fails a lot of time

Post by kenmo »

Check if Internet Explorer fails on the same HTTPS URLs.

See my post here
https://www.purebasic.fr/english/viewto ... 32#p517732

Internet Explorer on XP (and therefore PB, must use same API) could no longer handle newer HTTPS certs or something, so I resorted to "patching" my XP programs to call WGET instead. Firefox and Chrome handled the sites OK.
Mesa
Enthusiast
Enthusiast
Posts: 433
Joined: Fri Feb 24, 2012 10:19 am

Re: ReceiveHTTPMemory fails a lot of time

Post by Mesa »

Thanks
@kenmo: you're right, ie4 fails to.

M.
Post Reply