discuss-gnustep
[Top][All Lists]
Advanced

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

Re: GSMimeParser scanToken: and empty quoted strings


From: Niels Grewe
Subject: Re: GSMimeParser scanToken: and empty quoted strings
Date: Sat, 08 Oct 2011 19:55:45 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.23) Gecko/20111005 Icedove/3.1.15

Am 07.10.2011 20:31, schrieb Richard Frith-Macdonald:
> 
> On 7 Oct 2011, at 15:24, Niels Grewe wrote:
> 
>> Hello,
>>
>> I just ran into a little problem with the GSMimeParser in conjunction
>> with the authentication stuff in NSURL:
>> GSMimeParser's -scanToken: method returns nil if it scans an empty
>> quoted string, and this causes problems if a HTTP server announces an
>> empty realm for authentication because the corresponding
>> NSURLProtectionSpace is not created correctly.
>>
>> The trivial fix is to return @"" instead of nil when scanning empty
>> strings, but I wanted to check whether there was a good reason for the
>> present behaviour.
> 
> 
> I can't immediately think of one ... and a quick look at the usage of the 
> method in base seems to show that changing it to return an empty string would 
> do no harm.
> In fact, having it scan "" as an empty string seems more consistent/intuitive 
> than returning nil.

Okay, good to hear. I went ahead and commited the change.

Cheers,

Niels



reply via email to

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