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

Diff of /translate.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by dpavlin, Wed Aug 9 21:44:31 2000 UTC revision 1.3 by dpavlin, Thu Aug 10 13:39:31 2000 UTC
# Line 1  Line 1 
1  int translate_path(request_rec *r) {  int translate_path(request_rec *r) {
2          char *uri = r->uri;          char *uri = r->uri;
3          request_rec *subr;          request_rec *subr;
4            char *type = NULL;
5          extern do_czs;          extern do_czs;
6    
7          do_czs=0;          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') {          if (uri[0]=='/' && uri[1]=='c' && uri[2]=='z' && uri[3]=='s') {
13  #if 0  #if 0
14                  ap_table_setn(r->headers_out, "Location", ap_pstrcat(r->pool, uri+2, "?czs", NULL));                  ap_table_setn(r->headers_out, "Location", ap_pstrcat(r->pool, uri+2, "?czs", NULL));
# Line 11  int translate_path(request_rec *r) { Line 16  int translate_path(request_rec *r) {
16  #endif  #endif
17                  subr = (request_rec *) ap_sub_req_lookup_uri(r->uri+4, r);                  subr = (request_rec *) ap_sub_req_lookup_uri(r->uri+4, r);
18                  r->filename=ap_pstrdup(r->pool, subr->filename);                  r->filename=ap_pstrdup(r->pool, subr->filename);
19                  ap_destroy_sub_req(subr);                  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;                  do_czs=1;
27                    ap_destroy_sub_req(subr);
28  #ifdef XHEADER  #ifdef XHEADER
29    # ifdef DEBUG
30                  ap_table_setn(r->headers_out, "X-debug", XHEADER);                  ap_table_setn(r->headers_out, "X-debug", XHEADER);
31    # endif
32  #endif  #endif
                 ap_table_setn(r->headers_out, "X-translate", r->uri);  
33                  return OK;                  return OK;
34          }          }
35    

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

  ViewVC Help
Powered by ViewVC 1.1.26