Kratimoyporroon has asked for the wisdom of the Perl Monks concerning the following question:

Please read this:

FROM: http://faqchest.dynhost.com/prgm/perlu-l/perl-00/perl-0001/perl-000100/perl00011417_17732.html Date: Fri, 14 Jan 2000 08:32:43 -0500 From: Adrian Hands <PRIVACY PROTECTION> Subject: Re: Help!! HTTP::Cookies Matthew Shack wrote: > > Hello... > I am trying to parse a webpage and get the cookie and then send it > back using HTTP::Cookies. Can someone well me if this is even the correct > way and if not can some one tell me what I should use? and if I am using the > correct the pm can someone tell me how to use it? Thanks.. > > ~~Shack You should be able to extract cookies with that package, manipulate them and send them back with the next request. The package works well, but the biggest problem I've run into in using it is: It doesn't like URL's that contain only one dot. "http://foo.com" won't work. According to the RFC, URLs must contain at least two dots and this package enforces that.

------------------------------

Is there any truth to this? What would be an alternative package to use? The reason is, my cookies don't seem to be working. And I wonder if this is why, as the site has only one dot...

  • Comment on HTTP::cookies and URLs with only one dot?

Replies are listed 'Best First'.
Re: HTTP::cookies and URLs with only one dot?
by rinceWind (Monsignor) on Feb 27, 2002 at 14:57 UTC
    If the site is http://foo.com, http://www.foo.com should work, as you are implying that foo.com is a single host domain. Also, I wonder about three dots e.g. http://myhost.foo.co.uk

    On the more general subject of cookies, nms have just released a strengthened replacement for Matt Wright's cookie lib.