Closed
Description
Description
Hello! I'm building a wasm app using meilisearch-sdk, and found this confusing error when calling Client::new
:
index out of bounds: the len is 0 but the index is 0
Expected behavior
Client::new
does not panic.
Current behavior
Turns out it's http
's way of telling us that a header name is capitalized, and panics.
Here's the http
code that panics (HeaderName::from_static
):
https://github.com/hyperium/http/blob/v1.1.0/src/header/name.rs#L1197-L1224
And I think the X-Meilisearch-Client
is what causes it:
https://github.com/meilisearch/meilisearch-rust/blob/v0.26.0/src/reqwest.rs#L35
Environment (please complete the following information):
- OS: wasm32
- Meilisearch version: v1.7.6
- meilisearch-rust version: v0.26.0
- http version: v1.1.0 (behavior should be the same with http v1.0.0)
Metadata
Metadata
Assignees
Labels
No labels