Proposal:
The problem is that application/json headers are currently hardcoded in searchd.
Even when calling the /cli endpoint—which doesn’t return JSON — the Content-Type: application/json header is still present:
root@232f511affc0:/workdir# curl -v 0:9308/cli -d 'show version'
* Trying 0.0.0.0:9308...
* Connected to 0.0.0.0 (127.0.0.1) port 9308
> POST /cli HTTP/1.1
> Host: 0.0.0.0:9308
> User-Agent: curl/8.5.0
> Accept: */*
> Content-Length: 12
> Content-Type: application/x-www-form-urlencoded
>
< HTTP/1.1 200 OK
< Server: 0.0.0 14ad759ed@25062009 (columnar 5.0.2 3813c56@25060612) (secondary 5.0.2 3813c56@25060612) (knn 5.0.2 3813c56@25060612) (embeddings 1.0.0) (buddy v3.30.2-gc16d9c)
< Content-Type: application/json; charset=UTF-8
< Content-Length: 527
<
+------------+----------------------------------+
| Component | Version |
+------------+----------------------------------+
| Daemon | 0.0.0 14ad759ed@25062009 |
| Columnar | columnar 5.0.2 3813c56@25060612 |
| Secondary | secondary 5.0.2 3813c56@25060612 |
| Knn | knn 5.0.2 3813c56@25060612 |
| Embeddings | embeddings 1.0.0 |
| Buddy | buddy v3.30.2-gc16d9c |
+------------+----------------------------------+
6 rows in set (0.003 sec)
We need to provide a mechanism for Buddy to define desired headers and pass them upstream, so daemon can attach or override them accordingly
Checklist:
To be completed by the assignee. Check off tasks that have been completed or are not applicable.
Details
Proposal:
The problem is that
application/jsonheaders are currently hardcoded in searchd.Even when calling the /cli endpoint—which doesn’t return JSON — the
Content-Type: application/jsonheader is still present:We need to provide a mechanism for Buddy to define desired headers and pass them upstream, so daemon can attach or override them accordingly
Checklist:
To be completed by the assignee. Check off tasks that have been completed or are not applicable.
Details