/[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

Annotation of /translate.c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (hide annotations)
Fri Aug 11 09:57:16 2000 UTC (23 years, 8 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 dpavlin 1.1 int translate_path(request_rec *r) {
2     char *uri = r->uri;
3     request_rec *subr;
4 dpavlin 1.3 char *type = NULL;
5 dpavlin 1.1 extern do_czs;
6 dpavlin 1.3
7 dpavlin 1.1 do_czs=0;
8    
9 dpavlin 1.3 #ifdef DEBUG
10     ap_table_setn(r->headers_out, "X-translate", r->uri);
11     #endif
12 dpavlin 1.1 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 dpavlin 1.3 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 dpavlin 1.1 ap_destroy_sub_req(subr);
28 dpavlin 1.2 #ifdef XHEADER
29 dpavlin 1.3 # ifdef DEBUG
30 dpavlin 1.2 ap_table_setn(r->headers_out, "X-debug", XHEADER);
31 dpavlin 1.3 # endif
32 dpavlin 1.2 #endif
33 dpavlin 1.1 return OK;
34     }
35    
36     return DECLINED;
37     }

  ViewVC Help
Powered by ViewVC 1.1.26