• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Logflare / logflare / 9d4eae2d5cd011e9afd7c4f7de82922955d8ea00
82%

Build:
DEFAULT BRANCH: main
Ran 03 Aug 2026 12:08AM UTC
Jobs 1
Files 496
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

02 Aug 2026 11:52PM UTC coverage: 81.62% (+0.03%) from 81.592%
9d4eae2d5cd011e9afd7c4f7de82922955d8ea00

push

github

web-flow
fix(http): prevent duplicate transport-owned headers (#3567)

* fix(webhook): prevent duplicate transport-owned headers in HTTP backends

When a user supplies a Content-Type header on a webhook/log-drain backend,
Tesla's JSON middleware appended a second one and Tesla.put_headers/2 does not
dedupe, so requests went out with two Content-Type values. Receivers
concatenated them into an unparseable value and delivered an empty body.

Give transport-owned headers a single source instead of relying on header
ordering:

- Add Logflare.Backends.Adaptor.HttpBased.Headers with drop_reserved/2 and
  normalize_keys/1.
- WebhookAdaptor.Client.send/1 strips the reserved set per request: content-type
  only when the JSON middleware will encode the body (binary bodies keep a custom
  content-type), content-encoding when gzip is enabled.
- HttpBased.Client.new/1 strips content-encoding (gzip) and authorization
  (token/basic auth).
- WebhookAdaptor.cast_config/2 lowercases header keys so stored config cannot
  hold case-variant duplicates.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix(otlp): drop user content-type owned by the request formatter

HttpBased.Client deliberately excluded content-type from its reserved
header set because the body is not known at client-build time, so it
could not tell whether Tesla.Middleware.JSON would encode and own it.
But OtlpAdaptor passes user-configured headers alongside ProtobufFormatter,
which always sets content-type to application/x-protobuf. A user-supplied
content-type therefore survived next to the formatter's, reintroducing the
duplicate-header failure mode for OTLP backends.

Let the formatter that owns the header declare it instead of having the
client guess what middleware will do:

- HttpBased.Client.reserved_header_names/1 folds in an optional
  reserved_headers/0 exported by the formatter module (handles both the
  module and {module, opts} forms).
- OtlpAdaptor.ProtobufFormatter and Sen... (continued)

30 of 33 new or added lines in 6 files covered. (90.91%)

7 existing lines in 4 files now uncovered.

13735 of 16828 relevant lines covered (81.62%)

7351.89 hits per line

Uncovered Changes

Lines Coverage ∆ File
2
93.68
-1.44% lib/logflare/backends/adaptor/webhook_adaptor.ex
1
82.76
-7.24% lib/logflare/backends/adaptor/http_based/client.ex

Coverage Regressions

Lines Coverage ∆ File
3
67.86
-10.71% lib/logflare/gen_singleton/watcher.ex
2
82.76
-7.24% lib/logflare/backends/adaptor/http_based/client.ex
1
88.89
-11.11% lib/logflare/backends/ingest_event_queue/buffer_cache_worker.ex
1
30.77
-3.85% lib/logflare/sources/source/text_notification_server.ex
Jobs
ID Job ID Ran Files Coverage
1 9d4eae2d5cd011e9afd7c4f7de82922955d8ea00.1 03 Aug 2026 12:08AM UTC 496
81.62
GitHub Action Run
Source Files on build 9d4eae2d5cd011e9afd7c4f7de82922955d8ea00
  • Tree
  • List 496
  • Changed 12
  • Source Changed 0
  • Coverage Changed 12
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 9d4eae2d on github
  • Prev Build on main (#31FF0825...)
  • Next Build on main (#38A03FC1...)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc