HTTP::Cookies vs. Netscape cookies, part 2: port matching

Andreas Gustafsson (gson@araneus.fi)
Wed, 30 Sep 1998 15:20:25 +0300 (EEST)


Here's another bug in HTTP::Cookies.

Netscape-style HTTP cookies do not contain "Port" attributes and
should be sent to any server with a matching domain regardless of the
port, but HTTP::Cookies in libwww-5.36 will not send a Netscape-style
cookie received from one port to a server on another port.

The problem is fixed by the following patch.

*** Cookies.pm.orig	Fri Apr 10 15:26:13 1998
--- Cookies.pm	Tue Sep 29 09:45:42 1998
***************
*** 253,259 ****
  		    push(@cur, $k => $v);
  		}
  	    }
- 	    push(@cur, "Port" => $req_port);
  	    push(@cur, "Discard" => undef) unless $expires;
  	    push(@cur, "Version" => 0);
  	    push(@set, \@cur);
--- 273,278 ----
-- 
Andreas Gustafsson, gson@araneus.fi