I was thinking about something along these lines: int TclWeb_SendHeaders(void *arg);
int TclWeb_HeaderSet(char *header, char *val, void *arg); int TclWeb_SetStatus(int status, void *arg); int TclWeb_Cookie(Tcl_Obj *list, void *arg); int TclWeb_GetCookie(Tcl_Obj *list, void *arg); int TclWeb_GetCGIVars(Tcl_Obj *list, void *arg); int TclWeb_GetEnvVars(Tcl_Obj *list, void *arg); /* upload stuff goes here */ int TclWeb_Escape(char *out, char *in, int len, void *var); int TclWeb_UnEscape(char *out, char *in, int len, void *var); int TclWeb_Base64Encode(char *out, char *in, int len, void *arg); int TclWeb_Base64Decode(char *out, char *in, int len, void *arg); int TclWeb_EscapeShellCommand(char *out, char *in, void *arg); /* output/write/flush? */ /* error (log) ? */ Maybe switching some things to Tcl_Obj's instead of char *'s. Writing a layer like this would give us a place to put the #ifdef's to either use local implementations, or farm the work out to Apache, dipending if the code is compiled for an apache module or stand-alone. -- David N. Welton Consulting: http://www.dedasys.com/ Free Software: http://people.debian.org/~davidw/ Apache Tcl: http://tcl.apache.org/ Personal: http://www.efn.org/~davidw/
