aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/http
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
commit6400e9461eb46fbf792bb457abea992f9bb135c1 (patch)
tree5d5cb817648f650d76cf1076100726fd9b8448e8 /library/cpp/http
parent9f21dcc5d3d7c6e54e7adbaa2abaa6d86ae08c59 (diff)
downloadydb-6400e9461eb46fbf792bb457abea992f9bb135c1.tar.gz
Restoring authorship annotation for <luchko@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/http')
-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
-rw-r--r--library/cpp/http/misc/httpdate.cpp4
-rw-r--r--library/cpp/http/misc/httpdate.h2
7 files changed, 22 insertions, 22 deletions
diff --git a/library/cpp/http/fetch/exthttpcodes.cpp b/library/cpp/http/fetch/exthttpcodes.cpp
index 225ff74242..acc05650c8 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 f73069517e..6b525052cd 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 1bc15d3200..eab0328b18 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 b1718fecc7..b2810bbd41 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 963fc27c75..68eb00853d 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;
diff --git a/library/cpp/http/misc/httpdate.cpp b/library/cpp/http/misc/httpdate.cpp
index 04c1727adf..4a3031bbf4 100644
--- a/library/cpp/http/misc/httpdate.cpp
+++ b/library/cpp/http/misc/httpdate.cpp
@@ -54,11 +54,11 @@ int format_http_date(char buf[], size_t size, time_t when) {
GmTimeR(&when, &tms);
#ifndef HTTP_DATE_ISO_8601
- return snprintf(buf, size, "%s, %02d %s %04d %02d:%02d:%02d GMT",
+ return snprintf(buf, size, "%s, %02d %s %04d %02d:%02d:%02d GMT",
wkdays[tms.tm_wday], tms.tm_mday, months[tms.tm_mon],
tms.tm_year + 1900, tms.tm_hour, tms.tm_min, tms.tm_sec);
#else /* ISO 8601 */
- return snprintf(buf, size, "%04d%02d%02dT%02d%02d%02d+0000",
+ return snprintf(buf, size, "%04d%02d%02dT%02d%02d%02d+0000",
tms.tm_year + 1900, tms.tm_mon + 1, tms.tm_mday,
tms.tm_hour, tms.tm_min, tms.tm_sec);
#endif
diff --git a/library/cpp/http/misc/httpdate.h b/library/cpp/http/misc/httpdate.h
index 20915151bf..04876f38fe 100644
--- a/library/cpp/http/misc/httpdate.h
+++ b/library/cpp/http/misc/httpdate.h
@@ -15,7 +15,7 @@ inline time_t parse_http_date(const TStringBuf& datestring) {
}
}
-int format_http_date(char buf[], size_t size, time_t when);
+int format_http_date(char buf[], size_t size, time_t when);
char* format_http_date(time_t when, char* buf, size_t len);
TString FormatHttpDate(time_t when);