| 228 | } |
| 229 | |
| 230 | void THttpParser::ParseHttpVersion(TStringBuf httpVersion) { |
| 231 | if (!httpVersion.StartsWith("HTTP/", 5)) { |
| 232 | throw yexception() << "expect 'HTTP/'"; |
| 233 | } |
| 234 | httpVersion.Skip(5); |
| 235 | { |
| 236 | TStringBuf major, minor; |
| 237 | Split(httpVersion, '.', major, minor); |
| 238 | HttpVersion_.Major = FromString<unsigned>(major); |
| 239 | HttpVersion_.Minor = FromString<unsigned>(minor); |
| 240 | if (Y_LIKELY(HttpVersion_.Major > 1 || HttpVersion_.Minor > 0)) { |
| 241 | // since HTTP/1.1 Keep-Alive is default behaviour |
| 242 | KeepAlive_ = true; |
| 243 | } |
| 244 | } |
| 245 | } |
| 246 | |
| 247 | void THttpParser::ParseHeaderLine() { |
| 248 | if (!!HeaderLine_) { |
nothing calls this directly
no test coverage detected