Skip to content

Comments

Fix client connection issue with certain servers#12

Merged
AzeemMuzammil merged 5 commits intoballerina-platform:mainfrom
AzeemMuzammil:fix-client-connection
Jul 15, 2025
Merged

Fix client connection issue with certain servers#12
AzeemMuzammil merged 5 commits intoballerina-platform:mainfrom
AzeemMuzammil:fix-client-connection

Conversation

@AzeemMuzammil
Copy link
Contributor

Purpose

Fixes: ballerina-platform/ballerina-library#8090

Examples

Checklist

  • Linked to an issue
  • Updated the specification
  • Updated the changelog
  • Added tests
  • Checked native-image compatibility

Copilot AI review requested due to automatic review settings July 15, 2025 04:41
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes client connection issues by standardizing request paths and updating dependency versions.

  • Replaced hardcoded "/" paths with empty strings in HTTP client calls for post, get, and delete.
  • Bumped the http package to 2.14.2 and mcp to 0.4.3, and added io and log modules in Dependencies.toml.
  • Updated the mcp version and native JAR path to the new snapshot in Ballerina.toml.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
ballerina/streamable_http.bal Use "" as the request path instead of "/" for HTTP client methods.
ballerina/Dependencies.toml Updated package versions and added io and log modules.
ballerina/Ballerina.toml Bumped mcp version to 0.4.3 and adjusted native JAR path to snapshot.
Comments suppressed due to low confidence (1)

ballerina/streamable_http.bal:60

  • I don't see any new tests covering the behavior when the request path is an empty string. Consider adding unit or integration tests to verify that post, get, and delete with an empty path function correctly against target servers.
            http:Response response = check self.httpClient->post("", message, headers = headers);

@AzeemMuzammil AzeemMuzammil merged commit 665cee3 into ballerina-platform:main Jul 15, 2025
5 checks passed
@AzeemMuzammil AzeemMuzammil deleted the fix-client-connection branch July 15, 2025 04:47
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.

Ballerina MCP client fails to initialize with unsupported content type 'text/plain'

2 participants