bug: [flagparse] loopback references with paths default to HTTPS

Open
#162 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 2 days

@ktsoator is already working on this.

Since Nov 13, 2026.

  • #163 by @ktsoator — open

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
25/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
go
Domain
cli

Research direction

The bug is in how a2a card get picks a scheme for scheme-less loopback references that include a path, so start by reproducing it with a2a card get localhost/card.json --verbose. Find the scheme-defaulting code that handles bare loopback hosts and check why the path case falls through to HTTPS. Done means localhost, 127.0.0.1 and [::1] with a path resolve to http, and tests cover those cases. Pull request #163 is already open against this issue, so review it before starting any new work.

Written by the indexing model from the issue text.

Description

bug
What happened?

Scheme-less loopback references with a path and no port incorrectly default to HTTPS. They should default to HTTP, like bare loopback hosts.

Steps to reproduce

Run a2a card get localhost/card.json --verbose.

Actual: https://localhost/card.json
Expected: http://localhost/card.json

Also affects 127.0.0.1/card.json and [::1]/card.json.

CLI version

dev (53f9904)

Operating system & environment

macOS 26.6.2 (arm64)

Code of Conduct
  • I agree to follow this project's Code of Conduct
Dominant language
Go
Stars
181
Forks
28
Avg merge
2d 11h
Merged PRs (30d)
22

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from a2aproject/a2a-cli

All issues in a2aproject/a2a-cli

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.