return (resp);
}
-static isc_http_error_responses_t
-server_handle_accept_header(isc_nmsocket_t *socket, const uint8_t *value,
- const size_t valuelen) {
- const char type_accept_all[] = "*/*";
- const char type_dns_message[] = DNS_MEDIA_TYPE;
- isc_http_error_responses_t resp = ISC_HTTP_ERROR_SUCCESS;
-
- UNUSED(socket);
-
- if (!(HEADER_MATCH(type_dns_message, value, valuelen) ||
- HEADER_MATCH(type_accept_all, value, valuelen)))
- {
- resp = ISC_HTTP_ERROR_UNSUPPORTED_MEDIA_TYPE;
- }
- return (resp);
-}
-
static isc_http_error_responses_t
server_handle_header(isc_nmsocket_t *socket, const uint8_t *name,
size_t namelen, const uint8_t *value,
const char path[] = ":path";
const char method[] = ":method";
const char scheme[] = ":scheme";
- const char accept[] = "accept";
const char content_length[] = "Content-Length";
const char content_type[] = "Content-Type";
} else if (!was_error && HEADER_MATCH(content_type, name, namelen)) {
code = server_handle_content_type_header(socket, value,
valuelen);
- } else if (!was_error &&
- HEADER_MATCH(accept, (const char *)name, namelen)) {
- code = server_handle_accept_header(socket, value, valuelen);
}
return (code);