Monotone-Parent: 41663dd56ce370b47da06520cdf3f63f55b42cb6
Monotone-Revision: 678f408cc158a19d36fc3c0d6f53b3434a652542 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2007-09-11T19:34:52 Monotone-Branch: ca.inverse.sogomaint-2.0.2
parent
e1f063f50c
commit
ee7859f87e
|
@ -1,5 +1,13 @@
|
||||||
2007-09-11 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
2007-09-11 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||||
|
|
||||||
|
* UI/Common/WODirectAction+SOGo.m ([WODirectAction
|
||||||
|
-responseWithStatus:status]): new method that returns a WOResponse
|
||||||
|
initialized with the specified status code.
|
||||||
|
([WODirectAction -responseWith204]): new method that invokes the
|
||||||
|
above one with "204" as parameter.
|
||||||
|
([WODirectAction -redirectToLocation:newLocation]): rewrote method
|
||||||
|
to make use of -responseWithStatus:.
|
||||||
|
|
||||||
* UI/SOGoUI/UIxComponent.m ([UIxComponent -responseWith204]): new
|
* UI/SOGoUI/UIxComponent.m ([UIxComponent -responseWith204]): new
|
||||||
method that returns a WOResponse initialized with the 204 status
|
method that returns a WOResponse initialized with the 204 status
|
||||||
code.
|
code.
|
||||||
|
|
|
@ -30,6 +30,8 @@
|
||||||
|
|
||||||
@interface WODirectAction (SOGoExtension)
|
@interface WODirectAction (SOGoExtension)
|
||||||
|
|
||||||
|
- (WOResponse *) responseWithStatus: (unsigned int) status;
|
||||||
|
- (WOResponse *) responseWith204;
|
||||||
- (WOResponse *) redirectToLocation: (NSString *) newLocation;
|
- (WOResponse *) redirectToLocation: (NSString *) newLocation;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
|
@ -28,15 +28,30 @@
|
||||||
|
|
||||||
@implementation WODirectAction (SOGoExtension)
|
@implementation WODirectAction (SOGoExtension)
|
||||||
|
|
||||||
- (WOResponse *) redirectToLocation: (NSString *) newLocation
|
- (WOResponse *) responseWithStatus: (unsigned int) status
|
||||||
{
|
{
|
||||||
WOResponse *response;
|
WOResponse *response;
|
||||||
|
|
||||||
response = [context response];
|
response = [context response];
|
||||||
[response setStatus: 302 /* moved */];
|
[response setStatus: status];
|
||||||
|
|
||||||
|
return response;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (WOResponse *) responseWith204
|
||||||
|
{
|
||||||
|
return [self responseWithStatus: 204];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (WOResponse *) redirectToLocation: (NSString *) newLocation
|
||||||
|
{
|
||||||
|
WOResponse *response;
|
||||||
|
|
||||||
|
response = [self responseWithStatus: 302];
|
||||||
[response setHeader: newLocation forKey: @"location"];
|
[response setHeader: newLocation forKey: @"location"];
|
||||||
|
|
||||||
return response;
|
return response;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
Loading…
Reference in New Issue