| 170 | } |
| 171 | |
| 172 | int ServerSession::HandleClientMagic(std::string_view in) { |
| 173 | if (in.empty()) { |
| 174 | return -1; |
| 175 | } |
| 176 | |
| 177 | if (in.size() < NGHTTP2_CLIENT_MAGIC_LEN) { |
| 178 | return 0; |
| 179 | } |
| 180 | |
| 181 | if (!in.starts_with(NGHTTP2_CLIENT_MAGIC)) { |
| 182 | return -1; |
| 183 | } |
| 184 | |
| 185 | auto parse_ok = Session::ParseRecvMessage(in); |
| 186 | if (parse_ok != 0) { |
| 187 | return -1; |
| 188 | } |
| 189 | |
| 190 | good_client_magic_ = true; |
| 191 | return 0; |
| 192 | } |
| 193 | |
| 194 | void ServerSession::OnFullRequest(const RequestPtr& request_ptr) { |
| 195 | full_request_list_.push_front(request_ptr); |
nothing calls this directly
no outgoing calls
no test coverage detected