Skip to content

Return compact peer list by default when compact param is absent (BEP 23) #1986

Description

@josecelano

Goal

Fix the HTTP tracker announce handler to return the compact peer list by default when the client omits the compact GET parameter, aligning the tracker with the SUGGESTION in BEP 23.

Background

BEP 23 states: "It is SUGGESTED that trackers return compact format by default." The current implementation only returns compact when compact=1 is explicit. When absent, it falls through to non-compact (dictionary) format.

Scope

  • Invert the compact-default logic in build_response so None maps to compact
  • Remove the deviation NOTICE in packages/axum-http-server/src/lib.rs
  • Rename and invert the contract test
  • Remove the code-review comment that flagged this deviation

Full spec: docs/issues/drafts/align-http-tracker-compact-default-with-bep-23/ISSUE.md

Metadata

Metadata

Assignees

Labels

BugIncorrect Behavior

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions