On Thursday, 9 April 2015 at 13:32:38 UTC, Adam D. Ruppe wrote:
Don't use string == null, it is true for empty strings since
null and an empty string are almost interchangable.
You can try if(string is null) - is instead of ==. Though
usually in D, I just if(string.length == 0) and treat empty and
null the same way.
I replaced all == with "is" for path and domain. Here are results:
Name: A 1 Expires null: true Path equals null: true Domain
null: true
Name: A 2 Expires null: true Path equals null: false Domain
null: false
Name: A 3 Expires null: true Path equals null: false Domain
null: false
Name: A 4 Expires null: true Path equals null: false Domain
null: false
Name: A 5 Expires null: true Path equals null: false Domain
null: false
~~~~~~~~~
Name: A 6 Expires null: true Path equals null: false Domain
null: false
Name: A 7 Expires null: true Path equals null: false Domain
null: false
Name: A 8 Expires null: true Path equals null: false Domain
null: false
Name: A 9 Expires null: true Path equals null: false Domain
null: false
~~~~~~~~~
Name: A10 Expires null: true Path equals null: false Domain
null: false
Name: A11 Expires null: true Path equals null: false Domain
null: false
Name: A12 Expires null: true Path equals null: false Domain
null: false
Name: A13 Expires null: true Path equals null: false Domain
null: false
Could you try the code yourself as well? Because something is
clearly wrong here. I even have removed "shared" from everywhere,
results are still as above. There is no way "Expires" becomes
null, and "Path" and "Domain" become false.