28 |
#include "http_config.h" |
#include "http_config.h" |
29 |
#include "http_log.h" |
#include "http_log.h" |
30 |
#include "http_protocol.h" |
#include "http_protocol.h" |
31 |
|
#include "translate.c" |
32 |
|
|
33 |
module MODULE_VAR_EXPORT mod_czs; |
module MODULE_VAR_EXPORT mod_czs; |
34 |
|
|
101 |
return OK; |
return OK; |
102 |
} |
} |
103 |
|
|
|
int translate_path(request_rec *r) { |
|
|
char *uri = r->uri; |
|
|
request_rec *subr; |
|
|
do_czs=0; |
|
|
|
|
|
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)); |
|
|
return REDIRECT; |
|
|
#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); |
|
|
do_czs=1; |
|
|
return OK; |
|
|
} |
|
|
|
|
|
return DECLINED; |
|
|
} |
|
|
|
|
104 |
/* Dispatch list of content handlers */ |
/* Dispatch list of content handlers */ |
105 |
static const handler_rec czs_handlers[] = { |
static const handler_rec czs_handlers[] = { |
106 |
{ "czs", czs_handler }, |
{ "czs", czs_handler }, |
128 |
NULL, /* child_init */ |
NULL, /* child_init */ |
129 |
NULL, /* child_exit */ |
NULL, /* child_exit */ |
130 |
NULL /* [#0] post read-request */ |
NULL /* [#0] post read-request */ |
131 |
|
#ifdef EAPI |
132 |
|
,NULL, /* EAPI: add_module */ |
133 |
|
NULL, /* EAPI: remove_module */ |
134 |
|
NULL, /* EAPI: rewrite_command */ |
135 |
|
NULL /* EAPI: new_connection */ |
136 |
|
#endif |
137 |
}; |
}; |
138 |
|
|