| 167 | } |
| 168 | |
| 169 | bool ResponseParser::process_ready_header(ResponseHeader &req) { |
| 170 | if (lowcase.name == "content-length") { |
| 171 | try { |
| 172 | req.content_length = common::integer_cast<decltype(req.content_length)>(lowcase.value); // std::stoull |
| 173 | req.headers.pop_back(); |
| 174 | return true; |
| 175 | } catch (const std::exception &) { |
| 176 | } |
| 177 | return false; |
| 178 | } |
| 179 | if (lowcase.name == "connection") { |
| 180 | if (lowcase.value == "close") { |
| 181 | req.keep_alive = false; |
| 182 | req.headers.pop_back(); |
| 183 | return true; |
| 184 | } |
| 185 | if (lowcase.value == "keep-alive") { |
| 186 | req.keep_alive = true; |
| 187 | req.headers.pop_back(); |
| 188 | return true; |
| 189 | } |
| 190 | return false; |
| 191 | } |
| 192 | return true; |
| 193 | } |
nothing calls this directly
no outgoing calls
no test coverage detected