Browse Source

prepare for cgi param length checking

add market_report_disable_cgi_params_check flag

add TPackedConstChar, use it for property in UserData, misc modifications

refactor query_parsing, no strlen for every string
joker2k 2 years ago
parent
commit
83d3d0adfc
1 changed files with 10 additions and 0 deletions
  1. 10 0
      library/cpp/cgiparam/cgiparam.h

+ 10 - 0
library/cpp/cgiparam/cgiparam.h

@@ -125,6 +125,16 @@ public:
 
         return it->second.data();
     }
+
+    inline TStringBuf FormFieldBuf(const TStringBuf name, size_t numOfValue = 0) const {
+        const_iterator it = Find(name, numOfValue);
+
+        if (it == end()) {
+            return nullptr;
+        }
+
+        return it->second.data();
+    }
 };
 
 template <typename TIter>