Commit 84f783e
authored
fix: send content-type header on data path requests (#151)
The KV Connect spec requires clients to send a Content-Type header
with the value application/x-protobuf on all data path requests
(proto/kv-connect.md line 194). Neither the Rust remote client nor
the npm client library did, which breaks servers and proxies that
reject protobuf bodies without a content type.
* remote/lib.rs: Metadata::headers() gains the content-type entry
(the JSON metadata exchange already sent application/json)
* npm/src/kv_connect_api.ts: fetchProtobuf sends the same header for
all protocol versions
Fixes #81.1 parent b63cfd9 commit 84f783e
2 files changed
Lines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
175 | 175 | | |
176 | 176 | | |
177 | 177 | | |
| 178 | + | |
178 | 179 | | |
179 | 180 | | |
180 | 181 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
105 | | - | |
| 105 | + | |
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
110 | 114 | | |
111 | 115 | | |
112 | 116 | | |
| |||
0 commit comments