diff options
| author | swarmer <[email protected]> | 2026-07-11 02:20:39 +0300 |
|---|---|---|
| committer | swarmer <[email protected]> | 2026-07-11 03:03:18 +0300 |
| commit | b7ff4138b9a0cebbf49d76965b4ad3e2f14cced2 (patch) | |
| tree | dc5d36fcfbc65cd9cc981ca3b1ef2c5f72317b4d /library/cpp/http | |
| parent | 7237cd358efabb067e112bc08c70203d69b56615 (diff) | |
add Y_LIFETIME_BOUND to TParsedHttp* classes
commit_hash:5158390863c48b4ceb69eb344ea1996573220c4b
Diffstat (limited to 'library/cpp/http')
| -rw-r--r-- | library/cpp/http/misc/parsed_request.cpp | 10 | ||||
| -rw-r--r-- | library/cpp/http/misc/parsed_request.h | 6 |
2 files changed, 8 insertions, 8 deletions
diff --git a/library/cpp/http/misc/parsed_request.cpp b/library/cpp/http/misc/parsed_request.cpp index e332a24e917..5ce6d3ddc6c 100644 --- a/library/cpp/http/misc/parsed_request.cpp +++ b/library/cpp/http/misc/parsed_request.cpp @@ -4,16 +4,16 @@ #include <util/generic/yexception.h> #include <util/string/cast.h> -static inline TStringBuf StripLeft(const TStringBuf& s) noexcept { - const char* b = s.begin(); - const char* e = s.end(); +static TStringBuf StripLeft(const TStringBuf s Y_LIFETIME_BOUND) noexcept { + auto b = s.begin(); + auto e = s.end(); StripRangeBegin(b, e); return TStringBuf(b, e); } -TParsedHttpRequest::TParsedHttpRequest(const TStringBuf& str) { +TParsedHttpRequest::TParsedHttpRequest(const TStringBuf str Y_LIFETIME_BOUND) { TStringBuf tmp; if (!StripLeft(str).TrySplit(' ', Method, tmp)) { @@ -27,6 +27,6 @@ TParsedHttpRequest::TParsedHttpRequest(const TStringBuf& str) { Proto = StripLeft(Proto); } -TParsedHttpLocation::TParsedHttpLocation(const TStringBuf& req) { +TParsedHttpLocation::TParsedHttpLocation(const TStringBuf req Y_LIFETIME_BOUND) { req.Split('?', Path, Cgi); } diff --git a/library/cpp/http/misc/parsed_request.h b/library/cpp/http/misc/parsed_request.h index d4df7054951..27e8c37c0ee 100644 --- a/library/cpp/http/misc/parsed_request.h +++ b/library/cpp/http/misc/parsed_request.h @@ -3,7 +3,7 @@ #include <util/generic/strbuf.h> struct TParsedHttpRequest { - TParsedHttpRequest(const TStringBuf& str); + TParsedHttpRequest(const TStringBuf str Y_LIFETIME_BOUND); TStringBuf Method; TStringBuf Request; @@ -11,14 +11,14 @@ struct TParsedHttpRequest { }; struct TParsedHttpLocation { - TParsedHttpLocation(const TStringBuf& req); + TParsedHttpLocation(const TStringBuf req Y_LIFETIME_BOUND); TStringBuf Path; TStringBuf Cgi; }; struct TParsedHttpFull: public TParsedHttpRequest, public TParsedHttpLocation { - inline TParsedHttpFull(const TStringBuf& line) + TParsedHttpFull(const TStringBuf line Y_LIFETIME_BOUND) : TParsedHttpRequest(line) , TParsedHttpLocation(Request) { |
