⚠ This page is served via a proxy. Original site: https://github.com
This service does not collect credentials or authentication data.
Skip to content

Conversation

@Kaustubh1204
Copy link

Problem

Issue #266: kvctl commands fail with "unexpected end of JSON input" when connecting to non-loopback IP addresses via -H flag.

Root Cause

Duplicate c.Redirect() calls in RedirectIfNotLeader middleware (lines 78-79):

  • Line 78: Correctly redirects using extracted peer address ✓
  • Line 79: Immediately overwrites with raw session ID ✗

This creates an invalid redirect URL causing empty/malformed responses.

Solution

Remove the duplicate second redirect call (line 79).

Changes

  • 1 line removed from server/middleware/middleware.go
  • Minimal, focused fix with no other code changes

Fixes #266

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Command cannot find interface

1 participant