Send the build version in the outbound User-Agent (closes #313) #423

Merged
clawbot merged 1 commits from issue-313-user-agent-version into next 2026-10-02 09:48:35 +02:00
Collaborator

The http and slack targets sent the fixed User-Agent webhooker/1.0. They now send webhooker/ followed by the running build's version, the same value the web UI footer shows (#313).

The delivery engine takes the version from Globals, as the footer does, and one method on the engine builds the header for both targets. User-Agent stays a reserved target header, and the http target still sets it after the configured headers, so neither a configured nor an inbound User-Agent reaches the wire.

The new test builds the engine through its real constructor with a known version and checks the header each target sends. It also gives the http target a configured and an inbound User-Agent, to show both are replaced.

Not visible from the diff:

  • The engines the other delivery tests build have no version, so they send webhooker/ alone. The old webhooker/1.0 check in the forwarded-headers test is removed for that reason; the new test covers the header.
  • webhooker/1.0 still appears in the redaction tests as sample header data. It has nothing to do with what is sent.

Model: opus-5-5

The `http` and `slack` targets sent the fixed User-Agent `webhooker/1.0`. They now send `webhooker/` followed by the running build's version, the same value the web UI footer shows (https://git.eeqj.de/sneak/webhooker/issues/313). The delivery engine takes the version from `Globals`, as the footer does, and one method on the engine builds the header for both targets. `User-Agent` stays a reserved target header, and the `http` target still sets it after the configured headers, so neither a configured nor an inbound `User-Agent` reaches the wire. The new test builds the engine through its real constructor with a known version and checks the header each target sends. It also gives the `http` target a configured and an inbound `User-Agent`, to show both are replaced. Not visible from the diff: - The engines the other delivery tests build have no version, so they send `webhooker/` alone. The old `webhooker/1.0` check in the forwarded-headers test is removed for that reason; the new test covers the header. - `webhooker/1.0` still appears in the redaction tests as sample header data. It has nothing to do with what is sent. Model: opus-5-5
clawbot added the needs-review label 2026-10-02 09:27:57 +02:00
clawbot self-assigned this 2026-10-02 09:27:57 +02:00
clawbot added 1 commit 2026-10-02 09:27:58 +02:00
The http and slack targets sent the fixed User-Agent webhooker/1.0. The
delivery engine now takes the version from Globals, the value the web UI
footer shows, and one method builds webhooker/<version> for both
targets. The http target still sets it after the configured headers, so
a configured or inbound User-Agent never reaches the wire.

A test builds the engine through its real constructor with a known
version and checks the header each target sends.

Model: opus-5-5
Author
Collaborator

Review passed: both targets send webhooker/ plus the footer's version from one place, and a configured User-Agent is shown not to override it.

Model: opus-5-5

Review passed: both targets send `webhooker/` plus the footer's version from one place, and a configured `User-Agent` is shown not to override it. Model: opus-5-5
clawbot merged commit 2ac4d4d793 into next 2026-10-02 09:48:35 +02:00
clawbot deleted branch issue-313-user-agent-version 2026-10-02 09:48:36 +02:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/webhooker#423