[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r1232085 - /subversion/trunk/contrib/server-side/mod_setlocale/mod_setlocale.c

From: Daniel Shahaf <d.s_at_daniel.shahaf.name>
Date: Mon, 16 Jan 2012 22:25:19 +0200

Thanks for the fix. I saw some discussion on IRC -- are there outstanding problems not addressed by the below commit?

On Mon, Jan 16, 2012, at 18:08, neels_at_apache.org wrote:
> Author: neels
> Date: Mon Jan 16 18:08:13 2012
> New Revision: 1232085
>
> URL: http://svn.apache.org/viewvc?rev=1232085&view=rev
> Log:
> * contrib/server-side/mod_setlocale/mod_setlocale.c
> (setlocale_post_config): Disallow a set_ctype of NULL, use "" instead.
> Found by: philip
>
> Modified:
> subversion/trunk/contrib/server-side/mod_setlocale/mod_setlocale.c
>
> Modified: subversion/trunk/contrib/server-side/mod_setlocale/mod_setlocale.c
> URL: http://svn.apache.org/viewvc/subversion/trunk/contrib/server-side/mod_setlocale/mod_setlocale.c?rev=1232085&r1=1232084&r2=1232085&view=diff
> ==============================================================================
> --- subversion/trunk/contrib/server-side/mod_setlocale/mod_setlocale.c (original)
> +++ subversion/trunk/contrib/server-side/mod_setlocale/mod_setlocale.c Mon Jan 16 18:08:13 2012
> @@ -86,6 +86,16 @@ setlocale_post_config(apr_pool_t *pconf,
> return HTTP_INTERNAL_SERVER_ERROR;
> }
>
> + /* If the user omitted a configuration directive, then set_ctype will be
> + * NULL. Below condition sets it to "" instead, which loads the default as
> + * determined by the environment. httpd's env is typically set by
> + * /etc/apache2/envvars, where LANG defaults to 'C', but it can be set to
> + * the system default there by sourcing the system's config file (e.g. '.
> + * /etc/default/locale'). Then, it suffices to just load this module to
> + * obtain the system's default locale. */
> + if (cfg->set_ctype == NULL)
> + cfg->set_ctype = "";
> +
> cfg->old_ctype = setlocale(LC_CTYPE, cfg->set_ctype);
> if (cfg->old_ctype)
> {
>
>
>
Received on 2012-01-16 21:25:52 CET

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.