From 2cc16d900d5424f61ba4603702db7def1ec8b827 Mon Sep 17 00:00:00 2001 From: "Ilya (OgarkovIA)" Date: Sun, 27 Oct 2024 15:40:52 +0300 Subject: [PATCH] =?UTF-8?q?code:=20=D0=B7=D0=B0=D0=B4=D0=B0=D0=BD=D0=B8?= =?UTF-8?q?=D0=B5=20=D1=80=D0=B5=D0=B0=D0=BB=D0=B8=D0=B7=D0=BE=D0=B2=D0=B0?= =?UTF-8?q?=D0=BD=D0=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cs-lab34.layout | 12 ++++++------ main.cpp | 10 +++++++++- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/cs-lab34.layout b/cs-lab34.layout index a0e5908..9a132fb 100644 --- a/cs-lab34.layout +++ b/cs-lab34.layout @@ -2,22 +2,22 @@ - + - + - + - + - + - + diff --git a/main.cpp b/main.cpp index bf38683..758a15b 100644 --- a/main.cpp +++ b/main.cpp @@ -69,9 +69,17 @@ Input download(const string& address) { res = curl_easy_perform(curl); if (res != CURLE_OK) { - curl_easy_strerror(res); // cerr + curl_easy_strerror(res); exit(1); } + + if(!res) { + long req; + res = curl_easy_getinfo(curl, CURLINFO_SIZE_DOWNLOAD_T, &req); + if(!res) { + cerr<<"Request size: "<