MCPcopy Create free account
hub / github.com/apache/brpc / http_should_keep_alive

Function http_should_keep_alive

src/brpc/details/http_parser.cpp:2155–2171  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2153
2154
2155int
2156http_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
2174const char *

Callers

nothing calls this directly

Calls 1

http_message_needs_eofFunction · 0.85

Tested by

no test coverage detected