From c1eb1e5bbdb3c03a39ceccbb29251911e6513aaf Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Tue, 3 Oct 2006 16:10:55 +0000 Subject: [PATCH] Monotone-Parent: 0836ff89730377219eb53f7caa175eefe1f680a3 Monotone-Revision: 4c1856e056f5a2d88369a3bd6c3054a5b479f549 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2006-10-03T16:10:55 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 3 +++ SoObjects/SOGo/SOGoObject.m | 13 ++++++++----- 2 files changed, 11 insertions(+), 5 deletions(-) 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; }