aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/http/fetch
diff options
context:
space:
mode:
authorluchko <luchko@yandex-team.ru>2022-02-10 16:48:21 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:48:21 +0300
commit9f21dcc5d3d7c6e54e7adbaa2abaa6d86ae08c59 (patch)
treefe8d90bbd8376a597fb16b369d09be5fa22eedce /library/cpp/http/fetch
parent20fb5622594feb17be2ce26b99ddd6f60a870b3a (diff)
downloadydb-9f21dcc5d3d7c6e54e7adbaa2abaa6d86ae08c59.tar.gz
Restoring authorship annotation for <luchko@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/http/fetch')
-rw-r--r--library/cpp/http/fetch/exthttpcodes.cpp12
-rw-r--r--library/cpp/http/fetch/exthttpcodes.h4
-rw-r--r--library/cpp/http/fetch/httpfsm.rl66
-rw-r--r--library/cpp/http/fetch/httpheader.h10
-rw-r--r--library/cpp/http/fetch/httpzreader.h6
5 files changed, 19 insertions, 19 deletions
diff --git a/library/cpp/http/fetch/exthttpcodes.cpp b/library/cpp/http/fetch/exthttpcodes.cpp
index acc05650c8..225ff74242 100644
--- a/library/cpp/http/fetch/exthttpcodes.cpp
+++ b/library/cpp/http/fetch/exthttpcodes.cpp
@@ -148,22 +148,22 @@ static ui16* prepare_flags(http_flag* arg) {
http_flag* ptr;
size_t i;
- // устанавливаем значение по умолчанию для кодов не перечисленных в таблице выше
+ // устанавливаем значение по умолчанию для кодов не перечисленных в таблице выше
for (i = 0; i < EXT_HTTP_CODE_MAX; ++i)
flags[i] = CrazyServer;
- // устанавливаем флаги для перечисленных кодов
+ // устанавливаем флаги для перечисленных кодов
for (ptr = arg; ptr->http; ++ptr)
flags[ptr->http & (EXT_HTTP_CODE_MAX - 1)] = ptr->flag;
// для стандартных кодов ошибок берем флаги из первого кода каждой группы и проставляем их
- // всем кодам не перечисленным в таблице выше
+ // всем кодам не перечисленным в таблице выше
for (size_t group = 0; group < 1000; group += 100)
for (size_t j = group + 1; j < group + 100; ++j)
- flags[j] = flags[group];
+ flags[j] = flags[group];
- // предыдущий цикл затер некоторые флаги перечисленные в таблице выше
- // восстанавливаем их
+ // предыдущий цикл затер некоторые флаги перечисленные в таблице выше
+ // восстанавливаем их
for (ptr = arg; ptr->http; ++ptr)
flags[ptr->http & (EXT_HTTP_CODE_MAX - 1)] = ptr->flag;
diff --git a/library/cpp/http/fetch/exthttpcodes.h b/library/cpp/http/fetch/exthttpcodes.h
index 6b525052cd..f73069517e 100644
--- a/library/cpp/http/fetch/exthttpcodes.h
+++ b/library/cpp/http/fetch/exthttpcodes.h
@@ -109,8 +109,8 @@ enum ExtHttpCodes {
EXT_HTTP_FASTHOPS = 4000,
EXT_HTTP_NODOC = 4001,
-
- EXT_HTTP_MAX
+
+ EXT_HTTP_MAX
};
enum HttpFlags {
diff --git a/library/cpp/http/fetch/httpfsm.rl6 b/library/cpp/http/fetch/httpfsm.rl6
index eab0328b18..1bc15d3200 100644
--- a/library/cpp/http/fetch/httpfsm.rl6
+++ b/library/cpp/http/fetch/httpfsm.rl6
@@ -154,18 +154,18 @@ action set_content_length { setguarded(base_hd->content_length, I); }
content_length = "content-length"i def %beg_content_length int eoh %set_content_length;
-################# content-range ###################
+################# content-range ###################
action beg_content_range_start { guard(base_hd->content_range_start); I = -1; }
action set_content_range_start { setguarded(base_hd->content_range_start, I); }
action beg_content_range_end { guard(base_hd->content_range_end); I = -1; }
action set_content_range_end { setguarded(base_hd->content_range_end, I); }
action beg_content_range_el { guard(base_hd->content_range_entity_length); I = -1; }
action set_content_range_el { setguarded(base_hd->content_range_entity_length, I); }
-
+
content_range = "content-range"i def "bytes"i sp %beg_content_range_start int '-' %set_content_range_start
%beg_content_range_end int '/' %set_content_range_end
%beg_content_range_el int eoh %set_content_range_el;
-
+
################# accept-ranges ###################
action beg_accept_ranges {
if (hd) {
diff --git a/library/cpp/http/fetch/httpheader.h b/library/cpp/http/fetch/httpheader.h
index b2810bbd41..b1718fecc7 100644
--- a/library/cpp/http/fetch/httpheader.h
+++ b/library/cpp/http/fetch/httpheader.h
@@ -79,7 +79,7 @@ public:
public:
void Init() {
- error = 0;
+ error = 0;
header_size = 0;
entity_size = 0;
content_length = -1;
@@ -90,9 +90,9 @@ public:
compression_method = HTTP_COMPRESSION_UNSET;
transfer_chunked = -1;
connection_closed = HTTP_CONNECTION_UNDEFINED;
- content_range_start = -1;
- content_range_end = -1;
- content_range_entity_length = -1;
+ content_range_start = -1;
+ content_range_end = -1;
+ content_range_entity_length = -1;
base.clear();
}
@@ -153,7 +153,7 @@ public:
retry_after = DEFAULT_RETRY_AFTER;
x_robots_state = "xxxxx";
}
-
+
void Print() const {
THttpBaseHeader::Print();
printf("http_status: %" PRIi16 "\n", http_status);
diff --git a/library/cpp/http/fetch/httpzreader.h b/library/cpp/http/fetch/httpzreader.h
index 68eb00853d..963fc27c75 100644
--- a/library/cpp/http/fetch/httpzreader.h
+++ b/library/cpp/http/fetch/httpzreader.h
@@ -96,9 +96,9 @@ public:
void* tmpin = Stream.next_in;
long res = TBase::Read(tmpin);
Stream.next_in = (Bytef*)tmpin;
- if (res <= 0)
- return res;
- Stream.avail_in = (uInt)res;
+ if (res <= 0)
+ return res;
+ Stream.avail_in = (uInt)res;
}
Stream.next_out = Buf;