It’s working!

By farcaller August 29th, 2008

I’ve got the first completely working code!

Screenshot shows FOW running a simple fastcgi server on OSX with Apache2.

What’s implemented:

  • lots of FOWRequest stuff
  • URL resolver
  • CTemplate wrapper in objective-c
  • FastCGI server controller

I’ll see if this thing can work in linux/cocotron in the morning.

If somebody is interested, here’s the controller code for the page above:

@implementation Handler
 
- (FOWResponse *)handle:(FOWRequest *)rq
{
	FOWResponse *rs = [FOWResponse responseOK];
	[rs setHeader:@"text/plain" forKey:@"Content-Type"];
 
	NSMutableString *s = [[NSMutableString alloc] init];
	[s appendString:@"Hello, FOW World!\n\nMy environment:\n"];
	for(NSString *i in rq.environment) {
		[s appendFormat:@"%@=%@\n", i, [rq.environment objectForKey:i]];
	}
	rs.body = [s autorelease];
	return rs;
}
 
@end

This entry was posted on Friday, August 29th, 2008 at 22:21 and is filed under Uncategorized. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Leave a Reply