bug-wget
[Top][All Lists]
Advanced

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

Re: [Bug-wget] [PATCH] First


From: Tim Ruehsen
Subject: Re: [Bug-wget] [PATCH] First
Date: Tue, 18 Nov 2014 12:53:16 +0100
User-agent: KMail/4.14.2 (Linux/3.16.0-4-amd64; KDE/4.14.2; x86_64; ; )

On Tuesday 18 November 2014 12:08:58 Giuseppe Scrivano wrote:
> 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 :-)

Pushed.

Tim

Attachment: signature.asc
Description: This is a digitally signed message part.


reply via email to

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