| 293 | } |
| 294 | |
| 295 | TStringBuf GetPathAndQuery(const TStringBuf url Y_LIFETIME_BOUND, bool trimFragment) noexcept { |
| 296 | const size_t off = url.find('/', GetHttpPrefixSize(url)); |
| 297 | TStringBuf hostUnused, path; |
| 298 | if (!url.TrySplitAt(off, hostUnused, path)) |
| 299 | return "/"; |
| 300 | |
| 301 | return trimFragment ? path.Before('#') : path; |
| 302 | } |
| 303 | |
| 304 | // this strange creature returns 2nd level domain, possibly with port |
| 305 | TStringBuf GetDomain(const TStringBuf host Y_LIFETIME_BOUND) noexcept { |
no test coverage detected