From 1476b9f8cd051b533d79b116ce067543276f684c Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Thu, 16 Oct 2008 20:15:15 +0000 Subject: [PATCH] Monotone-Parent: 7783dd885054cebd0991b4226695bea400c2c6c1 Monotone-Revision: 6c02bf9631ff4ffa77f3dd2068fdf632d29bcc25 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2008-10-16T20:15:15 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 7 +++++++ SoObjects/SOGo/SOGoObject.m | 10 ++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5d1ea6e6a..ac479d260 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-10-16 Wolfgang Sourdeau + + * SoObjects/SOGo/SOGoObject.m ([SOGoObject -davURL]) + ([SOGoObject -soURL]): adjusted last change by checking that the + port returned initially is not nil before initializing the + returned NSURL. + 2008-10-15 Francis Lachapelle * UI/Contacts/UIxContactEditor.m ([_setupEmailFields]): avoid diff --git a/SoObjects/SOGo/SOGoObject.m b/SoObjects/SOGo/SOGoObject.m index 6a2bbf7c0..51fcfae78 100644 --- a/SoObjects/SOGo/SOGoObject.m +++ b/SoObjects/SOGo/SOGoObject.m @@ -1165,6 +1165,7 @@ SEL SOGoSelectorForPropertySetter (NSString *property) NSURL *serverURL, *url; NSMutableArray *path; NSString *baseURL, *urlMethod, *fullHost; + NSNumber *port; serverURL = [context serverURL]; baseURL = [[self baseURLInContext: context] stringByUnescapingURL]; @@ -1185,8 +1186,13 @@ SEL SOGoSelectorForPropertySetter (NSString *property) [path insertObject: expected atIndex: 2]; } - fullHost = [NSString stringWithFormat: @"%@:%@", - [serverURL host], [serverURL port]]; + port = [serverURL port]; + if (port) + fullHost = [NSString stringWithFormat: @"%@:%@", + [serverURL host], port]; + else + fullHost = [serverURL host]; + url = [[NSURL alloc] initWithScheme: [serverURL scheme] host: fullHost path: [path componentsJoinedByString: @"/"]];