/[mod_czs]/translate.c
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Contents of /translate.c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations)
Fri Aug 11 09:57:16 2000 UTC (23 years, 7 months ago) by dpavlin
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +0 -0 lines
File MIME type: text/plain
FILE REMOVED
removed not-needed mod_noczs

1 int translate_path(request_rec *r) {
2 char *uri = r->uri;
3 request_rec *subr;
4 char *type = NULL;
5 extern do_czs;
6
7 do_czs=0;
8
9 #ifdef DEBUG
10 ap_table_setn(r->headers_out, "X-translate", r->uri);
11 #endif
12 if (uri[0]=='/' && uri[1]=='c' && uri[2]=='z' && uri[3]=='s') {
13 #if 0
14 ap_table_setn(r->headers_out, "Location", ap_pstrcat(r->pool, uri+2, "?czs", NULL));
15 return REDIRECT;
16 #endif
17 subr = (request_rec *) ap_sub_req_lookup_uri(r->uri+4, r);
18 r->filename=ap_pstrdup(r->pool, subr->filename);
19 type = subr->content_type;
20 #ifdef DEBUG
21 ap_table_setn(r->headers_out, "X-translate-content-type", type);
22 #endif
23 if (type == NULL) {
24 return DECLINED; /* hm? */
25 }
26 do_czs=1;
27 ap_destroy_sub_req(subr);
28 #ifdef XHEADER
29 # ifdef DEBUG
30 ap_table_setn(r->headers_out, "X-debug", XHEADER);
31 # endif
32 #endif
33 return OK;
34 }
35
36 return DECLINED;
37 }

  ViewVC Help
Powered by ViewVC 1.1.26