--- mod_czs.c 2000/08/09 06:54:43 1.1 +++ mod_czs.c 2000/08/09 20:34:29 1.7 @@ -50,12 +50,14 @@ ap_log_reason("file permissions deny server access", r->filename, r); return FORBIDDEN; } +#ifdef DEBUG if(r->args != 0 || do_czs) { ap_table_setn(r->headers_out, "X-czs_filename", r->filename); - ap_table_setn(r->headers_out, "X-czs_args", r->args); + if (r->args != 0) { + ap_table_setn(r->headers_out, "X-czs_args", r->args); + } } - - r->content_type = "text/html"; /* hm? */ +#endif ap_soft_timeout("send", r); ap_send_http_header(r); @@ -68,29 +70,30 @@ #ifdef TEST_QUERYSTRING if(r->args == 0 && !do_czs) { +#else + if(!do_czs) { +#endif ap_send_fd(in, r); } else { -#endif - while(fgets(buffer,MAX_STRING_LEN,in)) { - for(i=0; ipool, in); @@ -100,13 +103,14 @@ int translate_path(request_rec *r) { char *uri = r->uri; request_rec *subr; + do_czs=0; - if (uri[0]=='/' && uri[1]=='_' && uri[2]=='/') { + if (uri[0]=='/' && uri[1]=='c' && uri[2]=='z' && uri[3]=='s') { #if 0 ap_table_setn(r->headers_out, "Location", ap_pstrcat(r->pool, uri+2, "?czs", NULL)); return REDIRECT; #endif - subr = (request_rec *) ap_sub_req_lookup_uri(r->uri+2, r); + subr = (request_rec *) ap_sub_req_lookup_uri(r->uri+4, r); r->filename=ap_pstrdup(r->pool, subr->filename); ap_destroy_sub_req(subr); do_czs=1;