http1.1和http1.0?
procedure TForm1.Button1Click(Sender: TObject);
var
cs:TClientSocket;
begin
cs := TClientSocket.Create(self);
cs.Address := '10.57.0.115';
cs.ClientType := ctBlocking;
cs.Port := 80;
cs.Active := true;
//问题:http/后面是1.1就说找不到页面,1.0就能正确下载到页面,为什么?
cs.Socket.SendText('GET /index.html HTTP/1.1'+#13+#10);
cs.Socket.SendText(#13+#10);
memo1.Lines.Add(cs.Socket.ReceiveText());
end;
注:10.57.0.115:80是iis的web server
http1.1协议和http1.0协议到底有什么区别,上面代码应该怎么改?