| 14 | } |
| 15 | |
| 16 | TParsedHttpRequest::TParsedHttpRequest(const TStringBuf& str) { |
| 17 | TStringBuf tmp; |
| 18 | |
| 19 | if (!StripLeft(str).TrySplit(' ', Method, tmp)) { |
| 20 | ythrow yexception() << "bad request(" << ToString(str).Quote() << ")"; |
| 21 | } |
| 22 | |
| 23 | if (!StripLeft(tmp).TrySplit(' ', Request, Proto)) { |
| 24 | ythrow yexception() << "bad request(" << ToString(str).Quote() << ")"; |
| 25 | } |
| 26 | |
| 27 | Proto = StripLeft(Proto); |
| 28 | } |
| 29 | |
| 30 | TParsedHttpLocation::TParsedHttpLocation(const TStringBuf& req) { |
| 31 | req.Split('?', Path, Cgi); |