Monotone-Parent: bcb224398f8aef1d62aad42e31635b91c0c993f7

Monotone-Revision: 01c5e5314c26ef13463ba2e2dec3d854ef793f1d

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2010-03-09T20:33:00
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau 2010-03-09 20:33:00 +00:00
parent 2b03a58b9d
commit 3b056b3226
3 changed files with 13 additions and 9 deletions

View file

@ -1,5 +1,9 @@
2010-03-09 Wolfgang Sourdeau <wsourdeau@inverse.ca> 2010-03-09 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* UI/Common/WODirectAction+SOGo.m
(-responseWithStatus:andJSONRepresentation:): we now add the
"application/json" content type to the response object.
* UI/SOGoUI/UIxComponent.m * UI/SOGoUI/UIxComponent.m
(-responseWithStatus:andJSONRepresentation:): we now add the (-responseWithStatus:andJSONRepresentation:): we now add the
"application/json" content type to the response object. "application/json" content type to the response object.

View file

@ -60,8 +60,13 @@
- (WOResponse *) responseWithStatus: (unsigned int) status - (WOResponse *) responseWithStatus: (unsigned int) status
andJSONRepresentation: (NSObject *) contentObject; andJSONRepresentation: (NSObject *) contentObject;
{ {
return [self responseWithStatus: status WOResponse *response;
response = [self responseWithStatus: status
andString: [contentObject jsonRepresentation]]; andString: [contentObject jsonRepresentation]];
[response setHeader: @"application/json" forKey: @"content-type"];
return response;
} }
- (WOResponse *) responseWith204 - (WOResponse *) responseWith204

View file

@ -113,18 +113,13 @@
/* actions */ /* actions */
- (WOResponse *) _responseWithLDAPPolicyError: (int) error - (WOResponse *) _responseWithLDAPPolicyError: (int) error
{ {
WOResponse *response;
NSDictionary *jsonError; NSDictionary *jsonError;
jsonError jsonError
= [NSDictionary dictionaryWithObject: [NSNumber numberWithInt: error] = [NSDictionary dictionaryWithObject: [NSNumber numberWithInt: error]
forKey: @"LDAPPasswordPolicyError"]; forKey: @"LDAPPasswordPolicyError"];
response = [self responseWithStatus: 403 return [self responseWithStatus: 403
andJSONRepresentation: jsonError]; andJSONRepresentation: jsonError];
[response setHeader: @"application/json"
forKey: @"content-type"];
return response;
} }
- (id <WOActionResults>) connectAction - (id <WOActionResults>) connectAction