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

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

Alex Rhomberg
December 11, 2000 02:18
HTTP:Cookies with URI::html (incl patch suggestion)
Message ID:

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/ containing

    my $req_path = $url->epath;

replaced by something like

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

- Alex Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About