EXTERN Tcl_Interp *Ns_GetConnInterp( Ns_Conn *conn );
This function, given the conn, returns the interpreter already assigned to the conn if one exists. If no interpreter is assigned, it allocates a new interpreter and assigns it to the conn. By using this function, you can be certain that the same interpreter (and its global state) are used by the registered request function and the filters.