Bsr à tous,
Mon application doit interroger un serveur de l'IGN en utilisant TFPHTTPClient.
Sous Windows,aucun problème
Sous Linux, AV au droit de TFPHTTPClient;Get()
J'ai mis à jour les libssl et consorts
Agaçant +++ ces outils fondamentaux insuffisamment testés, et consommateurs de temps.
Linux Mint 19
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38 function TMyIGNWebService.Get(const UseHTTPS: boolean; const MyUrl: string): string; var QUrl: String; {$IFDEF LINUX} LS: TStringList; {$ENDIF LINUX} begin QUrl := MyURL; //if (UseHTTPS) then QUrl += format(':%d', [HTTPS_PORT]); //https://wxs.ign.fr/essentiels/alti/rest/elevation.xml?lon=-0.02500000&lat=43.08600000&zonly=false AfficherMessageErreur('-- %s.Get(%s)', [ClassName, QUrl]); result := ''; {$IFDEF MSWINDOWS} try result := FHTTP.Get(QUrl); // OK sous Windows, segfault sous Linux except on E: exception do AfficherMessageErreur(E.Message); end; {$ENDIF MSWINDOWS} {$IFDEF LINUX} AfficherMessageErreur('0044'); LS := TStringList.Create; try try FHTTP.Get(QUrl, LS); result := LS.Text; except on E: exception do AfficherMessageErreur(E.Message); end; finally FreeandNil(LS); end; {$ENDIF LINUX} end;
Partager