diff options
author | almaslov <almaslov@yandex-team.ru> | 2022-02-10 16:47:35 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:47:35 +0300 |
commit | e95333de1601929cf26176ba4dfb31ea11a9d8e6 (patch) | |
tree | 4ca18e5e0d5eac73ae1539fbc22011612c7c1577 /library/cpp | |
parent | 3d9f012b4a922bdd0b9421963aa5985c2096028f (diff) | |
download | ydb-e95333de1601929cf26176ba4dfb31ea11a9d8e6.tar.gz |
Restoring authorship annotation for <almaslov@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp')
-rw-r--r-- | library/cpp/uri/common.h | 4 | ||||
-rw-r--r-- | library/cpp/uri/encodefsm.rl6 | 16 | ||||
-rw-r--r-- | library/cpp/uri/parsefsm.rl6 | 2 | ||||
-rw-r--r-- | library/cpp/uri/uri_ut.cpp | 8 |
4 files changed, 15 insertions, 15 deletions
diff --git a/library/cpp/uri/common.h b/library/cpp/uri/common.h index 8025357763..5d044df3b5 100644 --- a/library/cpp/uri/common.h +++ b/library/cpp/uri/common.h @@ -356,10 +356,10 @@ namespace NUri { FeaturesCheckSpecialChar = 0 | FeatureEncodeSpace | FeatureEncodeCntrl | FeatureEncodePercent, FeaturesEncodePChar = 0 | FeatureUpperEncoded | FeaturesEncodeDecode | FeaturesCheckSpecialChar, - + // http://wiki.yandex-team.ru/robot/newDesign/dups/normolization FeaturesRecommended = 0 | FeatureSchemeKnown | FeatureRemoteOnly | FeatureToLower | FeatureCheckHost | FeatureConvertHostIDN | FeatureHashBangToEscapedFragment | FeatureEncodeSpace | FeatureEncodeCntrl | FeatureEncodeExtendedASCII | FeatureUpperEncoded | FeatureDecodeUnreserved | FeaturePathOperation | FeaturePathStripRootParent, - + FeaturesRobot = FeaturesRecommended }; }; diff --git a/library/cpp/uri/encodefsm.rl6 b/library/cpp/uri/encodefsm.rl6 index 6a323aa85a..c28f6daed5 100644 --- a/library/cpp/uri/encodefsm.rl6 +++ b/library/cpp/uri/encodefsm.rl6 @@ -20,16 +20,16 @@ namespace NEncode { > { HexReset(); } % { DoHex(); }; - bad_escaped = ( "%" hex ) - % { - DoSym(*(fpc - 2)); - DoSym(*(fpc - 1)); - }; + bad_escaped = ( "%" hex ) + % { + DoSym(*(fpc - 2)); + DoSym(*(fpc - 1)); + }; - sym = (any - bad_escaped - escaped) %{ DoSym(*(fpc - 1)); }; - - main := ( escaped | bad_escaped | sym )**; + sym = (any - bad_escaped - escaped) %{ DoSym(*(fpc - 1)); }; + main := ( escaped | bad_escaped | sym )**; + write data; }%% diff --git a/library/cpp/uri/parsefsm.rl6 b/library/cpp/uri/parsefsm.rl6 index 7097723650..afd9286ac6 100644 --- a/library/cpp/uri/parsefsm.rl6 +++ b/library/cpp/uri/parsefsm.rl6 @@ -145,7 +145,7 @@ ext_space = " " >{ REQ(fpc, FeatureEncodeSpace) }; ext_cntrl = cntrl >{ REQ(fpc, FeatureEncodeCntrl) }; - pct_maybe_encoded = PCT (HEXDIG | HEXNUM)? ; + pct_maybe_encoded = PCT (HEXDIG | HEXNUM)? ; ext_safe = unreserved | pct_maybe_encoded | sub_delims diff --git a/library/cpp/uri/uri_ut.cpp b/library/cpp/uri/uri_ut.cpp index 2ebd83fc93..cca5490049 100644 --- a/library/cpp/uri/uri_ut.cpp +++ b/library/cpp/uri/uri_ut.cpp @@ -654,15 +654,15 @@ namespace NUri { #undef ENC } { -#define DEC "независимая-экспертиза-оценка-ущерба-авто-дтп.рф" -#define PNC "xn--------3veabbbbjgk5abecc3afsad2cg8bvq2alouolqf5brd3a4jzftgqd.xn--p1ai" +#define DEC "независимая-экспертиза-оценка-ущерба-авто-дтп.рф" +#define PNC "xn--------3veabbbbjgk5abecc3afsad2cg8bvq2alouolqf5brd3a4jzftgqd.xn--p1ai" TTest test = { "http://" DEC "/", TParseFlags(TFeature::FeaturesRobot), TState::ParsedOK, "http", "", "", PNC, 80, "/", "", ""}; TUri url; URL_TEST(url, test); UNIT_ASSERT_VALUES_EQUAL(url.PrintS(), "http://" PNC "/"); -#undef PNC -#undef DEC +#undef PNC +#undef DEC } } |