Merge pull request #4804 from kriswuollett/kriswuollett-protomethod-httppath-fix
Fixed proto method without package naming in ObjC.
diff --git a/src/objective-c/ProtoRPC/ProtoMethod.m b/src/objective-c/ProtoRPC/ProtoMethod.m
index 1113b4f..4b7ed63 100644
--- a/src/objective-c/ProtoRPC/ProtoMethod.m
+++ b/src/objective-c/ProtoRPC/ProtoMethod.m
@@ -46,7 +46,7 @@
}
- (NSString *)HTTPPath {
- if (_package) {
+ if (_package && _package.length > 0) {
return [NSString stringWithFormat:@"/%@.%@/%@", _package, _service, _method];
} else {
return [NSString stringWithFormat:@"/%@/%@", _service, _method];