Well, what's happening is that www.firstsite.com runs a java applet that we want to 
make sure it up and running.  So our developers created another site, that runs some 
scripts to test that the applet is up and running.  Also, I'm incorrect in stating 
that the two sites have different second-level domains.  It looks more like the 
following:

[...]
         $response = $browser->post(
                 'https://www.somesite.com/',
                 [
                         "USER" => $username,
                         "PASSWORD" => $password,
                        ]
[...]
         $response = $browser->get('https://testsite.somesite.com');
         if ($verbose!=0) {print "RESPONSE\n";}
         if ($verbose!=0) {print $response->as_string;print "\n";}

Also, here's my debug output:

LWP::UserAgent::new: ()
LWP::UserAgent::request: ()
HTTP::Cookies::add_cookie_header: Checking www.somesite.com for cookies
HTTP::Cookies::add_cookie_header: Checking .somesite.com for cookies
HTTP::Cookies::add_cookie_header: Checking somesite.com for cookies
HTTP::Cookies::add_cookie_header: Checking .com for cookies
LWP::UserAgent::send_request: POST https://www.somesite.com/
LWP::UserAgent::_need_proxy: Not proxied
LWP::Protocol::http::request: ()
HTTP::Cookies::extract_cookies: Set cookie SMSESSION => [cookie info]
HTTP::Cookies::extract_cookies: Set cookie FORMCRED => 
HTTP::Cookies::extract_cookies: Set cookie EntFXSessionR => [cookie info]
HTTP::Cookies::extract_cookies: Set cookie LOGIN => 0
LWP::UserAgent::request: Simple response: Found

LWP::UserAgent::request: ()
HTTP::Cookies::add_cookie_header: Checking testsite.somesite.com for cookies
HTTP::Cookies::add_cookie_header: Checking .somesite.com for cookies
HTTP::Cookies::add_cookie_header: - checking cookie path=/
HTTP::Cookies::add_cookie_header:  - checking cookie LOGIN=0
HTTP::Cookies::add_cookie_header:    it's a match
HTTP::Cookies::add_cookie_header:  - checking cookie FORMCRED=
HTTP::Cookies::add_cookie_header:    it's a match
HTTP::Cookies::add_cookie_header:  - checking cookie EntFXSessionR=[same cookie info 
as above]
HTTP::Cookies::add_cookie_header:    it's a match
HTTP::Cookies::add_cookie_header:  - checking cookie SMSESSION=[same cookie info as 
above]
HTTP::Cookies::add_cookie_header:    it's a match
HTTP::Cookies::add_cookie_header: Checking somesite.com for cookies
HTTP::Cookies::add_cookie_header: Checking .com for cookies
LWP::UserAgent::send_request: GET https://testsite.somesite.com/
LWP::UserAgent::_need_proxy: Not proxied
LWP::Protocol::http::request: ()
LWP::Protocol::collect: read 5 bytes
LWP::UserAgent::request: Simple response: OK

>-----Original Message-----
>From: John J Lee [mailto:[EMAIL PROTECTED]
>Sent: Thursday, June 19, 2003 20:38
>To: Alan Olegario
>Cc: [EMAIL PROTECTED]
>Subject: Re: Passing the same cookie and headers to a new site
>
>
>On Thu, 19 Jun 2003, Alan Olegario wrote:
>
>> I'm trying to log into a site and then pass the same cookies 
>and headers
>> that are used for the first site into another site.  Should I just be
>> able to do a get to the second site and still maintain the 
>same cookies
>> and headers?
>
>No.
>
>> Here's the meat of my code:
>[...]
>>         $response = $browser->post(
>>                 'https://www.firstsite.com/',
>>                 [
>>                         "USER" => $username,
>>                         "PASSWORD" => $password,
>[...]
>>         $response = $browser->get('https://www.secondsite.com');
>>         if ($verbose!=0) {print "RESPONSE\n";}
>>         if ($verbose!=0) {print $response->as_string;print "\n";}
>> }
>
>If the sites do indeed have different second-level domains 
>(firstsite and
>secondsite), then cookies set by the first shouldn't be returned to the
>second.
>
>Why do you want to do that?
>
>
>John
>
>


DISCLAIMER:
This message is intended for the named addressee(s) only and contains information that 
may be confidential, non-public or legally privileged.  If you are not the intended 
recipient, you must not copy this message or attachment or disclose the contents to 
any other person.  If you received this email in error, please contact the sender and 
permanently delete the email and any attachments. Unless expressly stated, opinions in 
this email are those of the individual sender and not of FX Alliance, LLC or its 
affiliates.

Reply via email to