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

Function http_message_needs_eof

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

Does the parser need to see an EOF to find the end of the message? */

Source from the content-addressed store, hash-verified

2086
2087/* Does the parser need to see an EOF to find the end of the message? */
2088int
2089http_message_needs_eof (const http_parser *parser)
2090{
2091 if (parser->type == HTTP_REQUEST) {
2092 return 0;
2093 }
2094
2095 /* See RFC 2616 section 4.4 */
2096 if (parser->status_code / 100 == 1 || /* 1xx e.g. Continue */
2097 parser->status_code == 204 || /* No Content */
2098 parser->status_code == 304 || /* Not Modified */
2099 parser->flags & F_SKIPBODY) { /* response to a HEAD request */
2100 return 0;
2101 }
2102
2103 if ((parser->flags & F_CHUNKED) || parser->content_length != ULLONG_MAX) {
2104 return 0;
2105 }
2106
2107 return 1;
2108}
2109
2110
2111int

Callers 2

http_parser_executeFunction · 0.85
http_should_keep_aliveFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected