From 85f0f643d72cc9b10c8b973975b4ebd0f2a1f58b Mon Sep 17 00:00:00 2001 From: Danila Date: Wed, 6 May 2026 15:47:35 +0300 Subject: [PATCH] =?UTF-8?q?=D0=BC=D0=BE=D0=B4=D0=B8=D1=84=D0=B8=D1=86?= =?UTF-8?q?=D0=B8=D1=80=D0=BE=D0=B2=D0=B0=D0=BD=D0=BD=D1=8B=D0=B9=20http?= =?UTF-8?q?=5Ftcp.py(3=20=D0=B7=D0=B0=D0=B4=D0=B0=D0=BD=D0=B8=D0=B5)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- http_tcp.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/http_tcp.py b/http_tcp.py index 4c1fa7e..f3482fe 100644 --- a/http_tcp.py +++ b/http_tcp.py @@ -2,7 +2,13 @@ import socket client = socket.socket(socket.AF_INET, socket.SOCK_STREAM) client.connect(('vyatsu.ru', 80)) -request = "GET / HTTP/1.1\r\nHost: vyatsu.ru\r\n\r\n" +request = ( + "GET / HTTP/1.1\r\n" + "Host: vyatsu.ru\r\n" + "User-Agent: python-requests/2.33.1\r\n" + "Accept: */*\r\n" + "\r\n" +) client.sendall(request.encode()) response = client.recv(4096) print(response.decode())