Skip to content

Commit

Permalink
Also decode for headers passed via the API
Browse files Browse the repository at this point in the history
  • Loading branch information
pyohannes committed Feb 27, 2024
1 parent 47f6ab4 commit 28a96bd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion opentelemetry-otlp/src/exporter/http/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ impl HttpExporterBuilder {
pub fn with_headers(mut self, headers: HashMap<String, String>) -> Self {
// headers will be wrapped, so we must do some logic to unwrap first.
let mut inst_headers = self.http_config.headers.unwrap_or_default();
inst_headers.extend(headers);
inst_headers.extend(headers.map(|(k, v)| (k, urlencoding::decode(v).unwrap_or_default())));

Check failure on line 123 in opentelemetry-otlp/src/exporter/http/mod.rs

View workflow job for this annotation

GitHub Actions / lint

`std::collections::HashMap<std::string::String, std::string::String>` is not an iterator
self.http_config.headers = Some(inst_headers);
self
}
Expand Down

0 comments on commit 28a96bd

Please sign in to comment.