libwww-perl / libwww-perl/HTTP-Cookies
bug report [rt.cpan.org #75715]
Open
Nobody has claimed this yet.
- Dominant language
- Perl
- Stars
- 4
- Forks
- 19
- PR merge metrics
- No merged PRs in 30d
Description
Migrated from rt.cpan.org#75715 (status was 'new')
Requestors:
- jan.hulala@gmail.com
From jan.hulala@gmail.com on 2012-03-12 14:19:33:
In add_cookie_header $val should be checked as described below >>
sub add_cookie_header
{
...
while (($key,$array) = each %{$cookies->{$path}}) {
my($version,$val,$port,$path_spec,$secure,$expires) =
@$array;
# *this line has to be added, to prevent errors for
undefined value*
next if !defined($val);
if ($secure && !$secure_request) {
next;
}
...
}
----
The above recommendation is based on experience when application using
WWW::Scripter module
parsed a web page containing the following JavaScript:
if (typeof navigator.cookieEnabled == "undefined") {
document.cookie = "cookie";
test = (document.cookie.indexOf("cookie") != -1) ? true :
false;
}
Once the fix recommended above has been applied, no error occurred.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Locate the add_cookie_header routine in the HTTP-Cookies source and inspect the loop that unpacks cookie values. Reproduce the undefined-value case described in the issue, then verify the routine handles it without an error and that the existing test suite still passes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- perl
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 50/100