MCPcopy Create free account
hub / github.com/NatronGitHub/Natron / http_should_keep_alive

Function http_should_keep_alive

libs/qhttpserver/http-parser/http_parser.c:2111–2127  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2109
2110
2111int
2112http_should_keep_alive (const http_parser *parser)
2113{
2114 if (parser->http_major > 0 && parser->http_minor > 0) {
2115 /* HTTP/1.1 */
2116 if (parser->flags & F_CONNECTION_CLOSE) {
2117 return 0;
2118 }
2119 } else {
2120 /* HTTP/1.0 or earlier */
2121 if (!(parser->flags & F_CONNECTION_KEEP_ALIVE)) {
2122 return 0;
2123 }
2124 }
2125
2126 return !http_message_needs_eof(parser);
2127}
2128
2129
2130const char *

Callers 2

headers_complete_cbFunction · 0.85
message_complete_cbFunction · 0.85

Calls 1

http_message_needs_eofFunction · 0.85

Tested by 2

headers_complete_cbFunction · 0.68
message_complete_cbFunction · 0.68