diff --git a/ChangeLog b/ChangeLog index 5bfe85167..aef80aabd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2006-10-03 Wolfgang Sourdeau + * SoObjects/SOGo/SOGoObject.m: compose the action url using the + newly available NSString+URL category. + * SoObjects/SOGo/NSDictionary+URL.m ([NSDictionary -asURLParameters]): handle dictionary entries which could be instances of NSArray rather than NSString. diff --git a/SoObjects/SOGo/SOGoObject.m b/SoObjects/SOGo/SOGoObject.m index ca9169e58..263a830be 100644 --- a/SoObjects/SOGo/SOGoObject.m +++ b/SoObjects/SOGo/SOGoObject.m @@ -26,6 +26,8 @@ #import #import "common.h" +#import "NSString+URL.h" + @interface SOGoObject(Content) - (NSString *)contentAsString; @end @@ -207,7 +209,7 @@ static NSTimeZone *serverTimeZone = nil; // default method) WORequest *rq; WOResponse *r; - NSString *uri; + NSString *uri; r = [(WOContext *)_ctx response]; rq = [(WOContext *)_ctx request]; @@ -233,11 +235,12 @@ static NSTimeZone *serverTimeZone = nil; } uri = [rq uri]; - if (![uri hasSuffix:@"/"]) uri = [uri stringByAppendingString:@"/"]; - uri = [uri stringByAppendingString:@"view"]; - [r setStatus:302 /* moved */]; - [r setHeader:uri forKey:@"location"]; + [r setHeader: [uri composeURLWithAction: @"view" + parameters: [rq formValues] + andHash: NO] + forKey:@"location"]; + return r; }