--- translate.c 2000/08/09 21:09:50 1.1 +++ translate.c 2000/08/10 13:39:31 1.3 @@ -1,9 +1,14 @@ int translate_path(request_rec *r) { char *uri = r->uri; request_rec *subr; + char *type = NULL; extern do_czs; + do_czs=0; +#ifdef DEBUG + ap_table_setn(r->headers_out, "X-translate", r->uri); +#endif 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)); @@ -11,8 +16,20 @@ #endif 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); + type = subr->content_type; +#ifdef DEBUG + ap_table_setn(r->headers_out, "X-translate-content-type", type); +#endif + if (type == NULL) { + return DECLINED; /* hm? */ + } do_czs=1; + ap_destroy_sub_req(subr); +#ifdef XHEADER +# ifdef DEBUG + ap_table_setn(r->headers_out, "X-debug", XHEADER); +# endif +#endif return OK; }