I don't understand why this cURL VP 7.3 clause works fine :
Code: Select all
_ = Connection:curl_easy_setopt(cURLOPT_HTTPGET, i(1)),
_ = Connection:curl_easy_setopt(cURLOPT_URL, s("http://www.largus.fr/fiche-technique.html\n\n")), % 1er mail
_ = Connection:curl_easy_perform()
Code: Select all
Serveur = "www.largus.fr", URL = format("http://%/fiche-technique.html\r\n",Serveur),
Req = format("GET % HTTP/1.1\r\nACCEPT */*\r\nHOST: %\r\n\r\n",URL,Serveur),
trap(SOCKET = msgSocketBlocking::msglay_Connect(Serveur, 80, []),_,(stdio::write("msglay_Connect : pas ok\n"),fail())),
msglay_WriteStr(SOCKET,Req),
This one works fine too :Content-Type: text/html
Content-Length: 166
Accept-Ranges: bytes
Date: Thu, 17 Sep 2015 07:32:19 GMT
X-Varnish: 921139673
Age: 0
Via: 1.1 varnish
Connection: close
X-Cache: MISS
<html>
<head><title>400 Bad Request</title></head>
<body bgcolor="white">
<center><h1>400 Bad Request</h1></center>
<hr><center>nginx</center>
</body>
</html>
Code: Select all
Serveur = "discuss.visual-prolog.com", URL = format("http://%\r\n",Serveur), % ok
Req = format("GET % HTTP/1.1\r\nACCEPT */*\r\nHOST: %\r\n\r\n",URL,Serveur),
trap(SOCKET = msgSocketBlocking::msglay_Connect(Serveur, 80, []),_,(stdio::write("msglay_Connect : pas ok\n"),fail())),
msglay_WriteStr(SOCKET,Req),
![Idea :idea:](./images/smilies/icon_idea.gif)