Commit afe187da28a4da2785ee9c56df3163080b01333c
- Diff rendering mode:
- inline
- side by side
lib/HTTP/Cookies.pm
(3 / 0)
|   | |||
| 237 | 237 | $expires++; | |
| 238 | 238 | } | |
| 239 | 239 | } | |
| 240 | elsif (!$first_param && lc($k) =~ /^(?:version|discard|ns-cookie)/) { | ||
| 241 | # ignore | ||
| 242 | } | ||
| 240 | 243 | else { | |
| 241 | 244 | push(@cur, $k => $v); | |
| 242 | 245 | } |
t/base/cookies.t
(12 / 1)
|   | |||
| 1 | print "1..44\n"; | ||
| 1 | print "1..45\n"; | ||
| 2 | 2 | ||
| 3 | 3 | #use LWP::Debug '+'; | |
| 4 | 4 | use HTTP::Cookies; | |
| … | … | ||
| 678 | 678 | Set-Cookie3: CUSTOMER=WILE_E_COYOTE; path="/"; domain=example.com; path_spec; discard; version=0 | |
| 679 | 679 | EOT | |
| 680 | 680 | ||
| 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; | ||
| 690 | print "not " unless $req->header("Cookie") eq "foo=\"bar\""; | ||
| 691 | print "ok 45\n"; | ||
| 681 | 692 | ||
| 682 | 693 | #------------------------------------------------------------------- | |
| 683 | 694 |

