Bad encoding method is used in this method, it can be the same for other function (i didn't check)
line 1895-1896
Change from
string res = site.indexPath + "?title=" +
HttpUtility.HtmlEncode(site.GetNsPrefix(-1)) + "Upload";
to
string res = site.indexPath + "?title=" +
HttpUtility.UrlEncode(site.GetNsPrefix(-1)) + "Upload";
If not change, it shows an http 404 error on french wiki (using the Spécial namespace)