MCPcopy Create free account
hub / github.com/apache/cloudberry / http_message_needs_eof

Function http_message_needs_eof

gpcontrib/gpcloud/lib/http_parser.cpp:2127–2147  ·  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

2125
2126/* Does the parser need to see an EOF to find the end of the message? */
2127int
2128http_message_needs_eof (const http_parser *parser)
2129{
2130 if (parser->type == HTTP_REQUEST) {
2131 return 0;
2132 }
2133
2134 /* See RFC 2616 section 4.4 */
2135 if (parser->status_code / 100 == 1 || /* 1xx e.g. Continue */
2136 parser->status_code == 204 || /* No Content */
2137 parser->status_code == 304 || /* Not Modified */
2138 parser->flags & F_SKIPBODY) { /* response to a HEAD request */
2139 return 0;
2140 }
2141
2142 if ((parser->flags & F_CHUNKED) || parser->content_length != ULLONG_MAX) {
2143 return 0;
2144 }
2145
2146 return 1;
2147}
2148
2149
2150int

Callers 2

http_parser_executeFunction · 0.85
http_should_keep_aliveFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected