diff options
| author | itelichko <[email protected]> | 2022-02-10 16:49:50 +0300 | 
|---|---|---|
| committer | Daniil Cherednik <[email protected]> | 2022-02-10 16:49:50 +0300 | 
| commit | e528d6c2977740bbaa65b93214a256e9eb1a953f (patch) | |
| tree | 5d5cb817648f650d76cf1076100726fd9b8448e8 /library/cpp/http/fetch | |
| parent | fd9f6ba99c923c73177f22c99ae5135d3508b4a1 (diff) | |
Restoring authorship annotation for <[email protected]>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/http/fetch')
| -rw-r--r-- | library/cpp/http/fetch/httpfsm.rl6 | 46 | ||||
| -rw-r--r-- | library/cpp/http/fetch/httpheader.cpp | 2 | ||||
| -rw-r--r-- | library/cpp/http/fetch/httpheader.h | 4 | 
3 files changed, 26 insertions, 26 deletions
diff --git a/library/cpp/http/fetch/httpfsm.rl6 b/library/cpp/http/fetch/httpfsm.rl6 index c457f99ad07..eab0328b187 100644 --- a/library/cpp/http/fetch/httpfsm.rl6 +++ b/library/cpp/http/fetch/httpfsm.rl6 @@ -265,7 +265,7 @@ location        = "location"i def loc_url eoh %set_location;  refresh         = "refresh"i def int ';' lws "url="i loc_url eoh %set_location;  ################# x-robots-tag ################ -action set_x_robots {  +action set_x_robots {      if (hd && AcceptingXRobots) {          if (I > 0)              hd->x_robots_tag |= I; @@ -285,7 +285,7 @@ x_robots_directive = "none"i      %{c(3)} | "all"i     %{c(-3)}                     | "noindex"i   %{c(1)} | "index"i   %{c(-1)}                     | "nofollow"i  %{c(2)} | "follow"i  %{c(-2)}                     | "noarchive"i %{c(4)} | "archive"i %{c(-4)} -                   | "noyaca"i    %{c(16)}  +                   | "noyaca"i    %{c(16)}                     | "noodp"i     %{c(8)};  any_value = (any_text_char - [, \t])+ (lws (any_text_char - [, \t])+)*; @@ -507,24 +507,24 @@ action set_if_modified_since {  if_modified_since = "if-modified-since"i def http_date eoh                      %set_if_modified_since; -################ retry-after ################  -action set_retry_after_withdate {  -    if (hd) {  -        hd->retry_after = DateTimeFields.ToTimeT(-1);  -    }  -}  -  -action set_retry_after_withdelta {  -    if (hd) {  -        hd->retry_after = TInstant::Now().Seconds() + I;  -    }  -}  -  -retry_after_withdate = "retry-after"i def http_date eoh  -                    %set_retry_after_withdate;  -retry_after_withdelta = "retry-after"i def int eoh  -                    %set_retry_after_withdelta;  -  +################ retry-after ################ +action set_retry_after_withdate { +    if (hd) { +        hd->retry_after = DateTimeFields.ToTimeT(-1); +    } +} + +action set_retry_after_withdelta { +    if (hd) { +        hd->retry_after = TInstant::Now().Seconds() + I; +    } +} + +retry_after_withdate = "retry-after"i def http_date eoh +                    %set_retry_after_withdate; +retry_after_withdelta = "retry-after"i def int eoh +                    %set_retry_after_withdelta; +  ############## request-cache-control ##############  action SETMAXAGE { if (request_hd) request_hd->max_age = I; } @@ -580,9 +580,9 @@ response_header = message_header        $0                  | x_robots_tag          @1                  | rel_canonical         @1                  | hreflang              @1 -                | squid_error           @1  -                | retry_after_withdate  @1  -                | retry_after_withdelta @1;  +                | squid_error           @1 +                | retry_after_withdate  @1 +                | retry_after_withdelta @1;  request_header  = message_header        $0                  | from_header           @1                  | host_header           @1 diff --git a/library/cpp/http/fetch/httpheader.cpp b/library/cpp/http/fetch/httpheader.cpp index 7561795b4a2..7d2225b8b7a 100644 --- a/library/cpp/http/fetch/httpheader.cpp +++ b/library/cpp/http/fetch/httpheader.cpp @@ -1,6 +1,6 @@  #include "httpheader.h" -const i64 DEFAULT_RETRY_AFTER = -1;  +const i64 DEFAULT_RETRY_AFTER = -1;  const i64 DEFAULT_IF_MODIFIED_SINCE = -1;  const i32 DEFAULT_MAX_AGE = -1;  const i8 DEFAULT_REQUEST_PRIORITY = -1; diff --git a/library/cpp/http/fetch/httpheader.h b/library/cpp/http/fetch/httpheader.h index 70754915cdf..b2810bbd413 100644 --- a/library/cpp/http/fetch/httpheader.h +++ b/library/cpp/http/fetch/httpheader.h @@ -150,7 +150,7 @@ public:          http_status = -1;          location.clear();          hreflangs[0] = 0; -        retry_after = DEFAULT_RETRY_AFTER;  +        retry_after = DEFAULT_RETRY_AFTER;          x_robots_state = "xxxxx";      } @@ -160,7 +160,7 @@ public:          printf("squid_error: %" PRIi8 "\n", squid_error);          printf("accept_ranges: %" PRIi8 "\n", accept_ranges);          printf("location: \"%s\"\n", location.c_str()); -        printf("retry_after: %" PRIi64 "\n", retry_after);  +        printf("retry_after: %" PRIi64 "\n", retry_after);      }  };  | 
