// $Id: ApacheWO+Echo.m,v 1.1 2004/06/08 11:06:00 helge Exp $ #include "ApacheWO.h" #include "common.h" #include @implementation ApacheWO(EchoHandler) - (int)performObjcEchoRequest:(ApacheRequest *)_rq { NSAutoreleasePool *pool; id cfg; NSString *s; pool = [[NSAutoreleasePool alloc] init]; /* get directory specific info ! */ cfg = [self configForDirectory:_rq]; [self performWoxPageRequest:_rq]; NSLog(@"CFG: %@", cfg); /* setup header */ [_rq setContentType:@"text/html"]; /* send header to client */ [_rq sendHttpHeader]; /* send body to client */ [_rq rputs:"

\n"]; [_rq rputs:"echo !"]; [_rq rputs:"

\n"]; s = [cfg stringValue]; if ([s length] > 0) [_rq rputs:[s cString]]; [_rq rputs:"
\n\n"]; [_rq rputs:"URI:
"];
  [_rq rputs:[[_rq uri] cString]];
  [_rq rputs:"
\n"]; [_rq rputs:"description:
"];
  [_rq rputs:[[_rq description] cString]];
  [_rq rputs:"
\n"]; [_rq rputs:"headers-in:
"];
  [_rq rputs:[[[_rq headersIn] description] cString]];
  [_rq rputs:"
\n"]; [_rq rputs:"headers-in-dict:
"];
  [_rq rputs:[[[[_rq headersIn] asDictionary] description] cString]];
  [_rq rputs:"
\n"]; RELEASE(pool); /* say we are done ... */ return ApacheHandledRequest; } @end /* ApacheWO(EchoHandler) */