develooper Front page | perl.libwww | Postings from December 2000

HTTP:Cookies with URI::html (incl patch suggestion)

From:
Alex Rhomberg
Date:
December 11, 2000 02:18
Subject:
HTTP:Cookies with URI::html (incl patch suggestion)
Message ID:
3A34A9F9.83510FF3@ife.ee.ethz.ch
Hi

unfortunately, I did not find a searchable archive, so I post this
question here.

I found that HTTP::Request transforms strings into URI::URL objects that
are stored in the HTTP::Request object. HTTP::Cookies works fine with
these URI::URL objects.

However, HTTP::Request also works with URI objects, but HTTP::Cookies
refuses to work with these requests, due to one difference in the
interface of URI::URL and URI: the URI::URL::epath method is the same as
URI::path in URI

My question is now:
Is URI::URL the only true path to nirwana when using Cookies or should
the two lines in HTTP/Cookies.pm containing

    my $req_path = $url->epath;

replaced by something like

    my $req_path = $url->can('epath') ? $url->epath : $url->path;

Regards
- Alex



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About