X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=Recycler%2FApacheWO%2FApacheWO%2BEcho.m;fp=Recycler%2FApacheWO%2FApacheWO%2BEcho.m;h=d1565234ad343cec9c3b8c7446908c51d4d947d4;hb=7ac47ed9fcaef5fa5c140363a78fa095c5d91797;hp=0000000000000000000000000000000000000000;hpb=d6593dc63e21a514640dd9c48f5bbea878af1116;p=sope diff --git a/Recycler/ApacheWO/ApacheWO+Echo.m b/Recycler/ApacheWO/ApacheWO+Echo.m new file mode 100644 index 00000000..d1565234 --- /dev/null +++ b/Recycler/ApacheWO/ApacheWO+Echo.m @@ -0,0 +1,61 @@ +// $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) */