Commit afe187da28a4da2785ee9c56df3163080b01333c

Don't let version=1 override behaviour if specified with a plan Set-Cookie header.
  
237237 $expires++;
238238 }
239239 }
240 elsif (!$first_param && lc($k) =~ /^(?:version|discard|ns-cookie)/) {
241 # ignore
242 }
240243 else {
241244 push(@cur, $k => $v);
242245 }
  
1print "1..44\n";
1print "1..45\n";
22
33#use LWP::Debug '+';
44use HTTP::Cookies;
678678Set-Cookie3: CUSTOMER=WILE_E_COYOTE; path="/"; domain=example.com; path_spec; discard; version=0
679679EOT
680680
681# Test Set-Cookie with version set
682$c = HTTP::Cookies->new;
683$res->header("Set-Cookie" => "foo=\"bar\";version=1");
684#print $res->as_string;
685$c->extract_cookies($res);
686#print $c->as_string;
687$req = HTTP::Request->new(GET => "http://www.example.com/foo");
688$c->add_cookie_header($req);
689#print $req->as_string;
690print "not " unless $req->header("Cookie") eq "foo=\"bar\"";
691print "ok 45\n";
681692
682693#-------------------------------------------------------------------
683694