Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
Grpc
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tci-gateway-module
Grpc
Commits
015ab35a
Commit
015ab35a
authored
9 years ago
by
Jorge Canizales
Browse files
Options
Downloads
Patches
Plain Diff
Clarify intention of the code that adds a default port
parent
55fcf504
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/objective-c/GRPCClient/private/GRPCHost.m
+4
-2
4 additions, 2 deletions
src/objective-c/GRPCClient/private/GRPCHost.m
with
4 additions
and
2 deletions
src/objective-c/GRPCClient/private/GRPCHost.m
+
4
−
2
View file @
015ab35a
...
...
@@ -58,8 +58,10 @@
// Default initializer.
-
(
instancetype
)
initWithAddress
:(
NSString
*
)
address
{
// To provide a default port, we try to interpret the address.
// TODO(jcanizales): Add unit tests for the types of addresses we want to let pass through.
// To provide a default port, we try to interpret the address. If it's just a host name without
// scheme and without port, we'll use port 443. If it has a scheme, we pass it untouched to the C
// gRPC library.
// TODO(jcanizales): Add unit tests for the types of addresses we want to let pass untouched.
NSURL
*
hostURL
=
[
NSURL
URLWithString
:[
@"https://"
stringByAppendingString
:
address
]];
if
(
hostURL
&&
!
hostURL
.
port
)
{
address
=
[
hostURL
.
host
stringByAppendingString
:
@":443"
];
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment