| 2153 | |
| 2154 | |
| 2155 | int |
| 2156 | http_should_keep_alive (const http_parser *parser) |
| 2157 | { |
| 2158 | if (parser->http_major > 0 && parser->http_minor > 0) { |
| 2159 | /* HTTP/1.1 */ |
| 2160 | if (parser->flags & F_CONNECTION_CLOSE) { |
| 2161 | return 0; |
| 2162 | } |
| 2163 | } else { |
| 2164 | /* HTTP/1.0 or earlier */ |
| 2165 | if (!(parser->flags & F_CONNECTION_KEEP_ALIVE)) { |
| 2166 | return 0; |
| 2167 | } |
| 2168 | } |
| 2169 | |
| 2170 | return !http_message_needs_eof(parser); |
| 2171 | } |
| 2172 | |
| 2173 | |
| 2174 | const char * |
nothing calls this directly
no test coverage detected