bug-wget
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-wget] [PATCH] First


From: Giuseppe Scrivano
Subject: Re: [Bug-wget] [PATCH] First
Date: Tue, 18 Nov 2014 12:08:58 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Tim Rühsen <address@hidden> writes:

> This patch fixes Authentication for turkish locales in case that the server 
> uses promised case-insensitivity for the authentication scheme (e.g. for 
> 'Basic' or 'Digest'). RFC 2617 and it's successor RFC 7235 both say:
>
>
> RFC 7235 2.1.  Challenge and Response
>
>    ...
>    It uses a case-insensitive token as a means to identify the authentication 
> scheme,
>    ...
>
> So I amended testenv/server/http/http_server.py to accept any case for 
> 'Basic' 
> and 'Digest' as well as sending 'BasIc' and 'DIgest'.
>
> Running the test suite with this change with LC_ALL set to 'tr_TR.utf8' 
> (turkish locale), three tests fail.
>
> The fix is to use a pure ASCII version of strcasecmp()/strncasecmp() and not 
> the locale dependant versions from the standard C library.
>
> Gnulib has ASCII versions of these functions (c_strcasecmp/c_strncasecmp). 
> Using these at two places of src/http.c fixes the problem.
>
> There are many other places in Wget where we should use these functions.
> (See my email from 24.9.2014 13:08:21).
> I am not sure (in fact I doubt) that we can blindly replace strcasecmp and 
> strncasecmp. So I try to make test cases to prove replacing is correct.
>
> What do you think ?

I think the patch looks fine, and when other cases show up, we can
replace the failing part with the c_ function from gnulib, as you said
we can't blindly replace all occurrences.

Feel free to push it :-)

Regards,
Giuseppe



reply via email to

[Prev in Thread] Current Thread [Next in Thread]