Philip Martin <philip@codematters.co.uk> writes:
> The "(84)Invalid or incomplete multibyte or wide character" bit is a
> result of the mod_dav error code storing global errno at the point a
> dav_error is created. Now global errno is only valid between a failed
> system call and the next system call, one cannot assume that a
> successful system call will set it to zero, not that a successful
> system call will leave it unchanged. On my system errno=84 is a side
> effect of a successful iconv() call, it is confusing to report this in
> the httpd error log.
>
> I'm don't know whether the mod_dav code is diligent about making sure
> that only valid errno values make it into dav_errors, but mod_dav_svn
> certainly isn't. Rather than put misleading information into the
> error log I propose we clear errno as follows
+1.
I've seen this "Invalid or incomplete multibyte or wide character"
error many, many times -- almost always when the real error is
something else. If we clear errno here, I think that will be the
right thing to do much more often than it's wrong.
-K
> * subversion/mod_dav_svn/util.c (dav_svn_convert_err): Clear errno.
>
> Index: subversion/mod_dav_svn/util.c
> ===================================================================
> --- subversion/mod_dav_svn/util.c (revision 8789)
> +++ subversion/mod_dav_svn/util.c (working copy)
> @@ -17,6 +17,7 @@
> */
>
> #include <apr_xml.h>
> +#include <apr_errno.h>
> #include <apr_uri.h>
> #include <mod_dav.h>
>
> @@ -51,6 +52,12 @@
> /* add other mappings here */
> }
>
> + /* dav_new_error_tag will record errno but Subversion makes no attempt
> + to ensure that it is valid. We reset it to avoid putting incorrect
> + information into the error log, at the expense of possibly removing
> + valid information. */
> + errno = 0;
> +
> derr = dav_new_error_tag(pool, status,
> serr->apr_err, apr_pstrdup(pool, serr->message),
> SVN_DAV_ERROR_NAMESPACE,
>
>
> --
> Philip Martin
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: dev-help@subversion.tigris.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Feb 20 21:43:23 2004