From 2b03a58b9d54fbe3389bfce8eb397bacf6a88c48 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Tue, 9 Mar 2010 20:29:17 +0000 Subject: [PATCH] Monotone-Parent: 9b3a8a4c66cfa9329c941f7789f248573edff6ac Monotone-Revision: bcb224398f8aef1d62aad42e31635b91c0c993f7 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2010-03-09T20:29:17 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 4 ++++ UI/SOGoUI/UIxComponent.m | 9 +++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index a5fe07334..ca5a7531a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2010-03-09 Wolfgang Sourdeau + * UI/SOGoUI/UIxComponent.m + (-responseWithStatus:andJSONRepresentation:): we now add the + "application/json" content type to the response object. + * UI/MainUI/SOGoUserHomePage.m (_usersResponseForResults:): we now return a JSON response with an encoded array of arrays. diff --git a/UI/SOGoUI/UIxComponent.m b/UI/SOGoUI/UIxComponent.m index 922740326..df69cb541 100644 --- a/UI/SOGoUI/UIxComponent.m +++ b/UI/SOGoUI/UIxComponent.m @@ -616,8 +616,13 @@ static NSMutableArray *abbrMonthLabelKeys = nil; - (WOResponse *) responseWithStatus: (unsigned int) status andJSONRepresentation: (NSObject *) contentObject; { - return [self responseWithStatus: status - andString: [contentObject jsonRepresentation]]; + WOResponse *response; + + response = [self responseWithStatus: status + andString: [contentObject jsonRepresentation]]; + [response setHeader: @"application/json" forKey: @"content-type"]; + + return response; } - (WOResponse *) responseWith204