/[mod_czs]/mod_czs.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 /mod_czs.c

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

revision 1.5 by dpavlin, Wed Aug 9 19:36:13 2000 UTC revision 1.7 by dpavlin, Wed Aug 9 20:34:29 2000 UTC
# Line 50  static int czs_handler(request_rec *r) { Line 50  static int czs_handler(request_rec *r) {
50                  ap_log_reason("file permissions deny server access", r->filename, r);                  ap_log_reason("file permissions deny server access", r->filename, r);
51                  return FORBIDDEN;                      return FORBIDDEN;    
52          }          }
53    #ifdef DEBUG
54          if(r->args != 0 || do_czs) {          if(r->args != 0 || do_czs) {
55                  ap_table_setn(r->headers_out, "X-czs_filename", r->filename);                  ap_table_setn(r->headers_out, "X-czs_filename", r->filename);
56                  if (r->args != 0) {                  if (r->args != 0) {
57                          ap_table_setn(r->headers_out, "X-czs_args", r->args);                          ap_table_setn(r->headers_out, "X-czs_args", r->args);
58                  }                  }
59          }          }
60    #endif
61    
62          ap_soft_timeout("send", r);          ap_soft_timeout("send", r);
63          ap_send_http_header(r);          ap_send_http_header(r);
# Line 103  int translate_path(request_rec *r) { Line 105  int translate_path(request_rec *r) {
105          request_rec *subr;          request_rec *subr;
106          do_czs=0;          do_czs=0;
107    
108          if (uri[0]=='/' && uri[1]=='_' && uri[2]=='/') {          if (uri[0]=='/' && uri[1]=='c' && uri[2]=='z' && uri[3]=='s') {
109  #if 0  #if 0
110                  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));
111                  return REDIRECT;                  return REDIRECT;
112  #endif  #endif
113                  subr = (request_rec *) ap_sub_req_lookup_uri(r->uri+2, r);                  subr = (request_rec *) ap_sub_req_lookup_uri(r->uri+4, r);
114                  r->filename=ap_pstrdup(r->pool, subr->filename);                  r->filename=ap_pstrdup(r->pool, subr->filename);
115                  ap_destroy_sub_req(subr);                  ap_destroy_sub_req(subr);
116                  do_czs=1;                  do_czs=1;

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.7

  ViewVC Help
Powered by ViewVC 1.1.26