Changes with Apache 2.3.5
+ *) mod_proxy, mod_proxy_ftp: Move ProxyFtpDirCharset from mod_proxy to
+ mod_proxy_ftp. [Takashi Sato]
+
*) mod_proxy, mod_proxy_connect: Move AllowCONNECT from mod_proxy to
mod_proxy_connect. [Takashi Sato]
</usage>
</directivesynopsis>
-<directivesynopsis>
-<name>ProxyFtpDirCharset</name>
-<description>Define the character set for proxied FTP listings</description>
-<syntax>ProxyFtpDirCharset <var>character set</var></syntax>
-<default>ProxyFtpDirCharset ISO-8859-1</default>
-<contextlist><context>server config</context><context>virtual host</context>
-<context>directory</context></contextlist>
-<compatibility>Available in Apache 2.2.7 and later</compatibility>
-
-<usage>
- <p>The <directive>ProxyFtpDirCharset</directive> directive defines the
- character set to be set for FTP directory listings in HTML generated by
- <module>mod_proxy_ftp</module>.</p>
-</usage>
-</directivesynopsis>
-
<directivesynopsis type="section">
<name>ProxyMatch</name>
<description>Container for directives applied to regular-expression-matched
</usage>
</directivesynopsis>
+<directivesynopsis>
+<name>ProxyFtpDirCharset</name>
+<description>Define the character set for proxied FTP listings</description>
+<syntax>ProxyFtpDirCharset <var>character set</var></syntax>
+<default>ProxyFtpDirCharset ISO-8859-1</default>
+<contextlist><context>server config</context><context>virtual host</context>
+<context>directory</context></contextlist>
+<compatibility>Available in Apache 2.2.7 and later. Moved from <module>mod_proxy</module> in Apache 2.3.5.</compatibility>
+
+<usage>
+ <p>The <directive>ProxyFtpDirCharset</directive> directive defines the
+ character set to be set for FTP directory listings in HTML generated by
+ <module>mod_proxy_ftp</module>.</p>
+</usage>
+</directivesynopsis>
</modulesynopsis>
* 20091119.1 (2.3.4-dev) ap_mutex_register(), ap_{proc,global}_mutex_create()
* 20091229.0 (2.3.5-dev) Move allowed_connect_ports from proxy_server_conf
* to mod_proxy_connect
+ * 20091230.0 (2.3.5-dev) Move ftp_directory_charset from proxy_dir_conf
+ * to proxy_ftp_dir_conf(mod_proxy_ftp)
*
*/
#define MODULE_MAGIC_COOKIE 0x41503234UL /* "AP24" */
#ifndef MODULE_MAGIC_NUMBER_MAJOR
-#define MODULE_MAGIC_NUMBER_MAJOR 20091229
+#define MODULE_MAGIC_NUMBER_MAJOR 20091230
#endif
#define MODULE_MAGIC_NUMBER_MINOR 0 /* 0...n */
new->cookie_domain_str = base->cookie_domain_str;
new->interpolate_env = (add->interpolate_env == -1) ? base->interpolate_env
: add->interpolate_env;
- new->ftp_directory_charset = add->ftp_directory_charset ?
- add->ftp_directory_charset :
- base->ftp_directory_charset;
new->preserve_host = (add->preserve_host_set == 0) ? base->preserve_host
: add->preserve_host;
new->preserve_host_set = add->preserve_host_set || base->preserve_host_set;
return NULL;
}
-static const char *set_ftp_directory_charset(cmd_parms *cmd, void *dconf,
- const char *arg)
-{
- proxy_dir_conf *conf = dconf;
-
- conf->ftp_directory_charset = arg;
- return NULL;
-}
-
static void ap_add_per_proxy_conf(server_rec *s, ap_conf_vector_t *dir_config)
{
proxy_server_conf *sconf = ap_get_module_config(s->module_config,
"Configure Status: proxy status to one of: on | off | full"),
AP_INIT_RAW_ARGS("ProxySet", set_proxy_param, NULL, RSRC_CONF|ACCESS_CONF,
"A balancer or worker name with list of params"),
- AP_INIT_TAKE1("ProxyFtpDirCharset", set_ftp_directory_charset, NULL,
- RSRC_CONF|ACCESS_CONF, "Define the character set for proxied FTP listings"),
{NULL}
};
apr_array_header_t* cookie_domains;
const apr_strmatch_pattern* cookie_path_str;
const apr_strmatch_pattern* cookie_domain_str;
- const char *ftp_directory_charset;
int interpolate_env;
int preserve_host;
int preserve_host_set;
int ftp_list_on_wildcard_set;
int ftp_escape_wildcards;
int ftp_escape_wildcards_set;
+ const char *ftp_directory_charset;
} proxy_ftp_dir_conf;
static void *create_proxy_ftp_dir_config(apr_pool_t *p, char *dummy)
new->ftp_escape_wildcards_set = add->ftp_escape_wildcards_set ?
1 :
base->ftp_escape_wildcards_set;
-
+ new->ftp_directory_charset = add->ftp_directory_charset ?
+ add->ftp_directory_charset :
+ base->ftp_directory_charset;
return new;
}
return NULL;
}
+static const char *set_ftp_directory_charset(cmd_parms *cmd, void *dconf,
+ const char *arg)
+{
+ proxy_ftp_dir_conf *conf = dconf;
+
+ conf->ftp_directory_charset = arg;
+ return NULL;
+}
+
/*
* Decodes a '%' escaped string, and returns the number of characters
*/
/* set content-type */
if (dirlisting) {
- proxy_dir_conf *dconf = ap_get_module_config(r->per_dir_config,
- &proxy_module);
-
ap_set_content_type(r, apr_pstrcat(p, "text/html;charset=",
- dconf->ftp_directory_charset ?
- dconf->ftp_directory_charset :
+ fdconf->ftp_directory_charset ?
+ fdconf->ftp_directory_charset :
"ISO-8859-1", NULL));
}
else {
RSRC_CONF|ACCESS_CONF, "Whether wildcard characters in a path cause mod_proxy_ftp to list the files instead of trying to get them. Defaults to on."),
AP_INIT_FLAG("ProxyFtpEscapeWildcards", set_ftp_escape_wildcards, NULL,
RSRC_CONF|ACCESS_CONF, "Whether the proxy should escape wildcards in paths before sending them to the FTP server. Defaults to on, but most FTP servers will need it turned off if you need to manage paths that contain wildcard characters."),
+ AP_INIT_TAKE1("ProxyFtpDirCharset", set_ftp_directory_charset, NULL,
+ RSRC_CONF|ACCESS_CONF, "Define the character set for proxied FTP listings"),
{NULL}
};