Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

HTTP::cookies and URLs with only one dot?

by Kratimoyporroon (Novice)
on Feb 27, 2002 at 07:37 UTC ( [id://147830]=perlquestion: print w/replies, xml ) Need Help??

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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://147830]
Approved by root
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (5)
As of 2024-04-19 23:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found