MCPcopy Create free account
hub / github.com/antirez/ds4 / append_cors_headers

Function append_cors_headers

ds4_server.c:4788–4793  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4786}
4787
4788static void split_reasoning_content(const char *text, size_t n, char **content_out, char **reasoning_out) {
4789 char *s = xstrndup(text ? text : "", n);
4790 char *body = s;
4791 if (!strncmp(body, "<think>", 7)) body += 7;
4792
4793 char *think_end = strstr(body, "</think>");
4794 if (think_end) {
4795 *think_end = '\0';
4796 *reasoning_out = xstrdup(body);

Callers 2

http_responseFunction · 0.85
sse_headersFunction · 0.85

Calls 1

buf_putsFunction · 0.85

Tested by

no test coverage detected