Re: [Simpleweb-Support] Safari cookie paths
                
                Brought to you by:
                
                    niallg
                    
                
            
            
        
        
        
    | 
     
      
      
      From: Niall G. <gal...@ya...> - 2007-10-11 17:30:42
      
     
   | 
Hi,
Thanks for the feedback, Ill look in to it. One thing
I did notice is that few browser support RFC 2109
properly, even Netscape having written the spec did
not support max-age, and did not handle the path in
quotes. Seems now Safari does not support the max-age
suggestion in RFC 2109 either. Can't see the point in
specifications if they are not followed, anyway for
the problem you describe here you would have to do:
Cookie cookie = null;
for(Cookie c : state.getCookies()) {
   if(c.getName().equals(MY_COOKIE_NAME)) {
      cookie = c;
      break; 
   }
}
Not very convinient, should really be able to acquire
the array by name.
Niall
--- Jeff Nichols <je...@ne...> wrote:
> Safari seems to handle sending its cookies
> differently than most  
> other browsers.  It sends *all* of its cookies for a
> domain,  
> regardless of 'path', but in an order of decreasing
> relevance.
> 
> For example, if the stored cookies are
> 
>    test=1;  path=/
>    test=2;  path=/dir
>    test=3;  path=/dir/file
> 
> Safari will send a request to /dir/file with the
> header
> 
>    Cookie: test=3; test=2; test=1
> 
> I have no idea if this is legal or proper, but it
> causes issues with  
> Simple's PlainState because getCookie(name) returns
> the last value in  
> the Cookie header, which is actually the least
> relevant value in this  
> case.
> 
> I'm not sure if this is something that should be
> changed in Simple,  
> but thought it could be helpful information.
> 
> A workaround is to manually iterate over the Cookie
> header with  
> CookieParser, returning the first value found.
> 
> Jeff
> 
> 
> 
>
-------------------------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems? 
> Stop.
> Now Search log events and configuration files using
> AJAX and a browser.
> Download your FREE copy of Splunk now >>
> http://get.splunk.com/
> _______________________________________________
> Simpleweb-Support mailing list
> Sim...@li...
>
https://lists.sourceforge.net/lists/listinfo/simpleweb-support
> 
      ____________________________________________________________________________________
Don't let your dream ride pass you by. Make it a reality with Yahoo! Autos.
http://autos.yahoo.com/index.html
 
 |