-
Notifications
You must be signed in to change notification settings - Fork 0
feat: Support HTTP schemes #41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Go test coverage
Total coverage: 75.8% |
MicahParks
commented
Aug 8, 2025
jajeffries
approved these changes
Aug 11, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - same comment about breaking changes as here, but I think fine in this case.
mfiedorowicz
approved these changes
Aug 11, 2025
Co-authored-by: Michal Fiedorowicz <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request expands the supported URL schemes in the
parseTarget
function to include both HTTP and HTTPS, in addition to the existing gRPC schemes. It updates the scheme validation logic, adjusts default ports and TLS verification accordingly, and improves error handling. The test suite is also updated to cover the new supported schemes and error scenarios.Expanded protocol support and validation:
http
andhttps
schemes inparseTarget
, updating theallowedSchemesRe
regular expression and related logic to accept these schemes. [1] [2]ErrInvalidTargetScheme
for consistent error handling when an unsupported scheme is encountered. [1] [2]Connection handling improvements:
grpc
andhttp
default to port 80,grpcs
andhttps
default to port 443 if the port is not specified.grpcs
andhttps
, disabled forgrpc
andhttp
.Test coverage enhancements:
http
andhttps
targets, including correct port and TLS verification expectations.ftp
) and expect the newErrInvalidTargetScheme
error.